What is the best form in Construct to accomplish the following?
- Enter a subevent
- Create a local variable for this scope, and initialize to the value of a global constant
- Execute a loop, modifying the value of the local variable
- After termination of the loop, reset the local variable to the value of the constant
- Run a second loop that makes use of the local variable
- Exit subevent
I'm not allowed to supply the constant as the initializing value--only numeric literals are permitted it seems. And I'm not sure of the "proper" way to execute an action modifying the local variable before a loop begins (or after a loop exits, or between loops). The best I could come up with is to insert a couple of System > Every Tick rows, as per the sample code below. It works, but it feels kludgy, especially in the context below where this is "run once" code at the start of the layout, and not something that actually runs every tick. Do any experienced folks have some wisdom to share?