Forum Discussion
Please allow "watching" multiple variables in same trigger.
In my opinion, DeveloperIgniti 's request is very reasonable and very relevant. I am (very, very) far from being a coder, but it doesn't seem any more complicated to me than evaluating the states of several elements at once.
Once again, Nedim 's solution shines in its simplicity and practicality: you just need to change the variable name (and/or add as many as you want) to reuse it immediately in another project. I'll keep it. Thank you. (I have a closet full of Nedim's JScodes 😀)
I also use the loop-acting like setInterval technique. I call it “creating a small engine.” Sometimes, I prefer the technique of a looping layer timeline. I display a layer at the beginning of the screen timeline. Nothing is visible on this layer, but it has lots of triggers working (with variables or elements on the base layer) that I don't want cluttering up the base layer's trigger panel. This layer loops every 0.25 seconds.
As for JudyNollet 's suggestion, I use it less often, and certainly with fewer variables (and triggers) to manage. The problem is that it's much harder to debug, in my opinion. Even if you display the variable on the screen while you're building the screen, you have to remember what its value was (T or F) before to make sure it changed correctly (F or T) after, at the right time. It can be tricky. But it's a matter of habit.
Related Content
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago
- 10 months ago