I'm trying to loop through all instances of an object. If I create the variable changeTextLoop as a global variable, it loops correctly. However, if I create it as a local variable under the testResetLoop group, it doesn't loop. Could someone tell me why this is? A sample capx is below.
Change multiple text objects.capx
Develop games in your browser. Powerful, performant & highly capable.
i think this is a better way of doing this
using for loop, loopindex, for each
Local variables are reset every tick. You'd need to set it to static for it to keep it's value.
Thanks for the help. I didn't know local vars were reset every loop.