Is binding an action to multiple entities similar in concept to instantiating? Will each entity have its own copy of all variable within the script and run the functions independently?
If so, is there any way I can watch the variable values for each entity? Such as my.x of 2 entities.
Re: Working with multiple entities
[Re: Torr]
#162082 10/20/0706:0110/20/0706:01
Quote: If many instances of the same function are running, which is normally the case with entity actions, each instance uses its own independent set of local variables.
For the code below, if I create 10 entities with the action Bot, would each entity have its own copy of botcount? Or do all 10 share just 1 botcount? Code:
var botcount = 0; function BotUpdate() { ... botcount = 0; if (vec_dist(my.x, you.x) < 200) { botcount += 1; } } action Bot { ... }
Re: Working with multiple entities
[Re: Torr]
#162083 10/20/0713:0210/20/0713:02