Notifications
Clear all

[Closed] problem third state in Float_reactor

First, excuse me my English.
I tried to create a Float_reaction with three states, but I have trouble defining the third. it is code:




 a = box pos:[-25,0,0]
 b = Box pos:[25,0,0]

 AttHold = EmptyModifier ()
 addmodifier a AttHold
 def = attributes prueba
 (
 	parameters pPrueba rollout:rPrueba
 	(
 		pSpinner type:#float ui:sPrueba
 	)
 	rollout rPrueba "Prueba"
 	(
 		spinner sPrueba "value"
 	)
 )
 custAttributes.add AttHold def
 AttHold.prueba.pSpinner.controller = bezier_float()
 FR = Float_reactor()
 b.pos.controller.Z_Position.controller = FR 

 reactTo FR AttHold.prueba.pSpinner.controller

 createReaction FR

 setReactionValue FR 1 0
 setReactionState FR 1 0

 setReactionValue FR 2 50
 setReactionState FR 2 100

 setReactionValue FR 3 100
 setReactionState FR 3 0

 getReactionValue FR 1
 getReactionState FR 1

 getReactionValue FR 2
 getReactionState FR 2

 getReactionValue FR 3
 getReactionState FR 3