[Closed] Scripting reactions with custom attributes?
Hi, I’m trying to learn how to script reactions but I’ve run into a problem.
reactTo $bone08.rotation.controller.reaction.z_rotation $Rectangle01.modifiers[#PEN_Attribute_Holder_2].footroll.controller
This line generates the error
– Unable to convert: 0.0 to type: Controller
But When I just run this:
$Rectangle01.modifiers[#PEN_Attribute_Holder_2].footroll.controller
it returns
Controller:Bezier_Float
All I’m trying to do is make a bone rotate according to a custom attribute thru reactions.
Anyone know what I’m doing wrong?
You know you can that in wiring with a bit of maxscript kind of :if footroll > 0 then () else () or you can use case of if you want to setup diferent reaction to diferent value of footroll.
for do a proper reactor controller you need to assing first the reactor to the controller of the bone like.
reactor = float_Reactor
$bone08.rotation.controller.reaction.z_rotation.controller = reactor
and later define the reaction
to understand better reactor go to the maxscript help and search for reactor controller follow the sample and you will know how to do it.
hope this help.
myreactor = float_reactor()
$bone08.rotation.controller.reaction.z_rotation.controller = myreactor
myreactor.reactions.reactTo $Rectangle01.pos.controller
^This works
myreactor = float_reactor()
$bone08.rotation.controller.reaction.z_rotation.controller = myreactor
myreactor.reactions.reactTo $Rectangle01.modifiers[#PEN_Attribute_Holder_2].footroll.controller
However This ^ does not.
I think I am accessing the custom attribute wrong.
Any idea?
I get a
** system exception **
myreactor = float_reactor()
$bone08.rotation.controller.reaction.z_rotation.co ntroller = myreactor
myreactor.reactions.reactTo $Rectangle01.modifiers#PEN_Attribute_Holder_2].Custom_Attributes.footroll.controller
you where missing the .custom_atributtes ( check win the trackview or with paul neale pen rigging ut8ils if you have Custom_Attributes as holder of the atributes.
one thing i use a lot when i doing wiring or … i write on the listener only the root of the ontroller to see if is good.
$Rectangle01.modifiers#PEN_Attribute_Holder_2].Custom_Attributes.footroll.controller