Another loopy question...
Is there any occasion when looping through TYPES and you have a function eval like so...
hitv = hitthenemy(xx,yy,xxx,yyy,clan1,clan2)
...if the current item is deleted how does that affect the returned value to the current item loop?
enemy 1 is moving and encounters enemy 2
enemy 1 is using collision detection and fires a check to ensure that enemy 2 is an enemy and if so they fight.
{fight resolved and enemy 1 (attacker) is killed RETURN 2 ELSE RETURN 0}
We are now back in enemy 1 loop .. so is enemy 1 loop gone or instantly moved on?
I think writing this out gives me a possible solution...mark the unit as dead and clean up after the loop??
I'm sure others have had this issue before...
Is there any occasion when looping through TYPES and you have a function eval like so...
hitv = hitthenemy(xx,yy,xxx,yyy,clan1,clan2)
...if the current item is deleted how does that affect the returned value to the current item loop?
enemy 1 is moving and encounters enemy 2
enemy 1 is using collision detection and fires a check to ensure that enemy 2 is an enemy and if so they fight.
{fight resolved and enemy 1 (attacker) is killed RETURN 2 ELSE RETURN 0}
We are now back in enemy 1 loop .. so is enemy 1 loop gone or instantly moved on?
I think writing this out gives me a possible solution...mark the unit as dead and clean up after the loop??
I'm sure others have had this issue before...