Jump to content
Sign in to follow this  
nalesnik

global and local variables

Recommended Posts

Ok, the situation is this. I've got a script (unit tracking another unit, not just follow somebody, but like in spy movies, keep the distance between leader, move closer, and farther, depens on situation), that is one big loop.

What I need now is generic code to break that loop in any moment (ie. on trigger activations). The coude should work, ie. when I run multiple instances of the tracking script. My idea for now is to have something like this.

On exec, you pass as the parameter name of the variable, then the script should do sth like this.

The hardest thing is the second line.

name = 0;

; HOW TO DO THAT

export name as global variable;

if name = 1 then goto exit

Any hints appreciated

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×