Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: parallel on September 26, 2013, 11:52:47 AM
-
Hi, I'm trying to make a master slider which controls the subsequent opacity decrease on 5 subgroups. Say the slider goes from 0 to 5; from 0 to 1- group #1 is gradually disappeared , between 1 and 2- group #2 is disappeared, and so on.
The example that shows a slider turning off the visibility of 4 cubes, does not seem applicable in this case as it's based on ints. I'm thinking I'll need a float switch but then the clues stop Any ideas?
-
You can use Float Operators to throw events based on the value of a float being greater or less than a specific value. You could change the state based on the slider value and change only the opacity values you want in that state.
-
The fog is lifting slightly- 5 states with each their 'float compare' sending the signal either back or forward down the chain, but then how to work with the specific float interval from the master float? That's where the float operator comes in?? gotta sleep on it. Thanks for dropping a clue, you might have described exactly how to do it, just can't see it atm.
-
I was thinking more of the effect being controlled in a separate state, so it would read what the slider was at and choose which state it should be in. Just put a float compare on the slider in each of the 5 states that checks to see if it is greater or less than its specific range. In the state, change the opacity for whatever objects it should be affecting in that range.
Might be a more dynamic way to do it, but that makes sense to me.
-
Hi,
you can use curves to do this actually. Your slider goe from 0 to 1 and you create curves that ranges from 0 to 1 and have the y axis to represent the group #1 alpha etc etc.
you the action "Sample curve" to do this.
If you have trouble, let me know, I'll do a working sample.
bye,
Jean
-
Idk, I'm having a logic shutdown on this.
I was thinking more of the effect being controlled in a separate state, so it would read what the slider was at and choose which state it should be in. Just put a float compare on the slider in each of the 5 states that checks to see if it is greater or less than its specific range.
Like a global transition to each of the 5 subgroups? And when doing a float compare with the masterSlider, how to define the interval in the particular Subgroup float ? just doing a float compare will only check if it's greater than a value, not gradually checking.
you can use curves to do this actually. Your slider goe from 0 to 1 and you create curves that ranges from 0 to 1 and have the y axis to represent the group #1 alpha etc etc.
How do I define only taking the Y axis from a curve?
Also, is there a way to control alpha without doing it via the shader/material?
-
Hi,
ok, please find a working sample
you have a slider, ranging from 0 to 1. and the cube has two fsm.
one that samples a curve to rotate the cube
one that samples another curve to change the alpha
both fsm takes the value from the slider to sample on the curve.
Alpha can only be changed on the material yes.
bye,
Jean
-
Thanks Jean, now I understand the sample curve better.
I'm still unsure how to distribute the intervals, attached is a current frame of what is not working, as either if i put float compares on the individual groups or on the main listener it returns a: 'loop count exceed maximum:1000 ...', at the bottom i put a next frame event to help that, but no. Can't find the overide in the inspector, but can't help thinking that this no good to override. Any hints to a better approach.
-
Hi,
You simply have your curve not reacting outside your intervals, so if you need to rotate an object only from .3 to .6 your curve will be 0 before and after these values.
Bye,
Jean