
3dGuy
Canada
Asked
— Edited
Hello, I need some code help. I realize this is super simple but can't get my head around it.
In the following code once "Master" or "Milady" has been identified and the ControlCommand has been executed,
I would like the CameraObjectName subject to be ignored for say, 1/2 hour.
To try and be clear, once it sees you it won't execute the ControlCammand repeatedly .
Thanks in advance. Tony
SayEZB(("I see " + $CameraObjectName))
if ($CameraObjectName = "Master")
sleep(2000)
ControlCommand("Script Manager", ScriptStart, "Fist Bump")
elseif ($CameraObjectName = "Milady")
sleep(2000)
ControlCommand("Script Manager", ScriptStart, "Royal Wave")
else
endif
Really not a good idea to run a loop in the camera control script... In essence it is already basically a loop in itself....
I am probably making this more complex than it needs to be, and I haven't completely formed the thought so I am not sure how I would do all of this, but...
In your camera control script, I would check for the contents of a variable and only execute the command if the variable was 'true' or whatever you set it to. after running the command, set the variable to 'false'.
Then you need another script that watches for that variable to change, and sets a timer when it does, and changes it back when the timer expires. That one can run in a loop.
Alan
@Richard R. Ok, I'll give up trying.
Alan
Don’t give up trying. This is actually a good exercise that could benefit others. Hopefully DJ will return to this post.
Thanks Alan. it is a challenge for me.
Okay - that's an easy bit of code to write. This doesn't need a loop. I'll write something for you to get you started. Stay tuned
Initialization script:
Camera script :