Servo Pad icon Servo Pad — Drag mouse or finger as a virtual joystick to control pan/tilt x- and y-axis servos with configurable ports, limits, inversion, and backgrounds. Try it →
Asked — Edited
1 Participant

Action If A Variable Changes?

Maybe this is not possible, I'm stuck on finding a method that would allow this to work. I know I can script checking for a specific variable change like this:


If ($WhatIsForDinner = "ChickenPotPie")
Print("Yummy")
EndIf

But I would like a script to take action anytime a specific variable changes. This would just run all the time looping and looking for a change to the variable in order to take action. Does anyone think that is possible?


:ChangeDetected
If ($WhatIsForDinner = *Changed?)
DoSomething
EndIf
GOTO(ChangeDetected)

ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

#1  

Waitforchange($variable_name)

Alan

#2  

Thank you Alan!

Digging further, I found that awesome feature just a moment ago. I love ARC! :D :D :D