Jump to content

Running a program on scene activation


rlebel

Recommended Posts

If you do a program "Status" condition on a KPL controller or responder button in a scene, the program will trigger when the scene triggers the status change on that button. For example:

 

If Status 'KPLTest A' is switched on
Then $Var = 100
Else $Var = 0

Presuming "KPLTest A" is linked to the scene, the variable $Var changes between 0 and 100 as the scene is switched off and on.

 

This is true regardless of how the scene is initiated since any way it happens will change the button status -- assuming it is a controller or responder in the scene.

 

Note this doesn't work if you use a "Control" test instead of "Status".

 

And of course if you remove the program-triggering button from the scene you still need to update your code to sync with that change.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...