playMaker

Author Topic: Master slider to control 5 floats  (Read 3256 times)

parallel

  • Full Member
  • ***
  • Posts: 155
Master slider to control 5 floats
« 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?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Master slider to control 5 floats
« Reply #1 on: September 26, 2013, 11:55:47 AM »
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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Master slider to control 5 floats
« Reply #2 on: September 26, 2013, 12:11:24 PM »
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.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Master slider to control 5 floats
« Reply #3 on: September 26, 2013, 01:13:00 PM »
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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Master slider to control 5 floats
« Reply #4 on: September 27, 2013, 01:17:51 AM »
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

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Master slider to control 5 floats
« Reply #5 on: September 27, 2013, 04:46:13 AM »
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.

Quote from: jeanfabre link=topic=5057.msg24011#msg24011
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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Master slider to control 5 floats
« Reply #6 on: September 27, 2013, 05:45:40 AM »
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

parallel

  • Full Member
  • ***
  • Posts: 155
Re: Master slider to control 5 floats
« Reply #7 on: September 27, 2013, 08:29:33 AM »
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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Master slider to control 5 floats
« Reply #8 on: September 30, 2013, 02:14:20 AM »
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