what you need to do is call a global variable, for example, ent_number and in the action for it, add these two lines:
ent_number += 1;
my.skill67 = ent_number;
you can use whatever skill you want, as long as you're not using it already in the current action/function. adding those few lines of code, will keep each entity with the same action from conflicting
Code:
var ent_number;
function anim_plantidle()
{
ent_number += 1;
my.skill67 = ent_number;
var percent =0;
var animRate =60;
var animThresh =99.5;
if(my.flag1==1)
{
animRate =plantAnimRate;
}
while(1)
{
percent +=GetSeconds()*animRate;
if(percent>=animThresh)
{
percent =0;
}
ent_animate(my,"idle",percent,0);
if(plantMode!=kPlantIdle)
{
return;
}
wait(1);
}
}