[r154] For Each and Trigger Once

Bugs will be moved here once resolved.

Post » Mon Feb 17, 2014 3:15 pm

@Roccinio

instead of doing a for_each then triggering once via condition, you do for_each and have an instance variable you check

If the variable is true to do what you want it to do and then at the end of that you set the variable to another value

Most likely you'll just use 1 and 0 for TRUE and FALSE.

This way it goes through, and triggers only if it's TRUE, then immediately set to FALSE after triggering. You set the variable to TRUE next time you want it to trigger for that instance.


Basically it's the manual way of "Trigger Once", since when it's true, you set it to false the first time it runs so it doesn't run again next tick.
The closed bug forum isn't really a good place to get support, but at least you searched the forums :)Thndr2014-02-17 15:17:10
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Mon Feb 17, 2014 3:35 pm

@Thndr
hi friend!
take a look here
http://www.scirra.com/forum/trigger-once-and-instances_topic86899.html
and let me know
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests