[Closed] ExposeTm with Reactions
How I can set reaction controller react to ExposeTm.localEulerY? If I do this
reactTo myReaction expTm.localEulerY
This wont work becouse localEulerY is not node or controller. I can do this with Reaction Manger but how to do it via sciprt?
I just gotta open my heart a little to you guys.
After many hours trying to understand Reaction Manger scripting I am only learn to hate it! Why, oh… why those reaction must indexed backward :banghead: last reaction is index 1 and second last 2 and so on. If I have understand it correct. Even if I could live with that wierd logic :argh: I just so not feel homie with RM yet and I starting to belive than I never will. Cursed be too complex riggs what need reaction manger and too leasy animators who wont want setup their reactions again every time when they need those
Hyymmm. There is something really wierd with those index numbers. Can someone explain to me what is wrong in this code?
SetReactionName MyReaction 1 "Normal"
setReactionValue MyReaction 1 (DegToRad 0.0)
setReactionState MyReaction 1 (DegToRad 0.0)
createReaction MyReaction
SetReactionName MyReaction 2 "Full left"
setReactionValue MyReaction 2 (DegToRad -180.0)
setReactionState MyReaction 2 (DegToRad -90.0)
createReaction MyReaction
SetReactionName MyReaction 3 "Full right"
setReactionValue MyReaction 3 (DegToRad 180.0)
setReactionState MyReaction 3 (DegToRad 90.0)
Got it working but I am not happy
Some reason reactions index values change when I change reaction value.
SetReactionValue myReaction 1 (degtorad 10.0)
I get round this becouse I use reaction name and search index to it every time when I change reaction value.
sNormal = sLeft = sRight = 0
for i=1 to (getReactionCount myReaction) do
(
case (getReactionName myReaction i) of
(
#normal : sNormal = i
#Full_left : sLeft = i
#Full_right : sRight = i
)
)
And now I can set values to state “#normal”.
setReactionValue myReaction sNormal (degtorad 10.0)
This way I can do what I want but why those index numbers change and can I prevent it?