[Closed] Node Event Callback Question
welp, dunno… works here even if I toggle the checkbox like a madman…
global callmat
fn prico a b = (
print "i work"
)
rollout roll_test "test" (
checkbox mats ""
on mats changed state do (
if state == on then (
callmat = NodeEventCallback materialOtherEvent:prico
print "soy callbo"
)
else (
callmat = undefined
gc light:true
print "me voy"
)
)
)
createDialog roll_test
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"me voy"
"soy callbo"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
"i work"
it is only working if i check and unckeck a few times…i don’t understand why
I mean, if i launch the script and check the checkbox…it’s not working…if i repeteadly checkand uncheck, then it works (with the checkbox checked of course), if i uncheck is nor working (it is ok) but if i check it again it is not working again…so i need to check and uncheck repeteadly :s
EDIT: i don’t know if that can affect…but i’m going to restart my comp :s
I make it work, but instead of activating or deactivating the callback, the callback is always working, but the function i call depends on a variable, if the variable is set to true then the function print the phrase, and if it’s set to false then the function don’t do anything.
Obviously the variable value is changed with the state of the checkbox.
It seems to work in this way, but i don’t know why the other way is not working fine for me :s
Cheers!