Okay so I am stumped and will appreciate any help.
I have this trigger for when any unit dies it then grants the killing unit a point on the leaderboard and then replaces the killing units' behavior with a different one depending on how many points you have.
The problem is that when a unit kills more than one unit at the same time it sends me an end of array error for the trigger and does not update the score or behaviors.
What I want is for the trigger to grant the +1 point then change the killing units behavior based on its amount of kills but the second simultaneous unit death is throwing everything off. How do I work around this so that it will trigger the action twice consecutively and not on top of each other?
Not sure why that would happen. Would need to see the trigger, as well as what array you're even talking about. (I assume it's just an integer array for each players' points?)
We cannot tell you what you are doing wrong unless you tell us what you are doing! We need either the triggers or preferably the map (or extract that can recreate the problem easily).
The sound of the problem is likely some sequencing issue. It might try and execute the same state twice rather than advancing state resulting in invalid states which ultimately cause some sort of array access error. It could be something as simple as the unit behaviour does not change until next frame. It could also be that the system design just does not support more than 1 death per frame.
Thanks for the quick replies, after a few hours of tedious tearing apart all my triggers I finally found the evil culprit. I was using the wrong trigger for adding the new behavior in. I was using the one with (Player) instead of the normal one. Such a tiny difference makes a huge impact ><"
Okay so I am stumped and will appreciate any help.
I have this trigger for when any unit dies it then grants the killing unit a point on the leaderboard and then replaces the killing units' behavior with a different one depending on how many points you have.
The problem is that when a unit kills more than one unit at the same time it sends me an end of array error for the trigger and does not update the score or behaviors.
What I want is for the trigger to grant the +1 point then change the killing units behavior based on its amount of kills but the second simultaneous unit death is throwing everything off. How do I work around this so that it will trigger the action twice consecutively and not on top of each other?
Thanks ahead of time.
Not sure why that would happen. Would need to see the trigger, as well as what array you're even talking about. (I assume it's just an integer array for each players' points?)
We cannot tell you what you are doing wrong unless you tell us what you are doing! We need either the triggers or preferably the map (or extract that can recreate the problem easily).
The sound of the problem is likely some sequencing issue. It might try and execute the same state twice rather than advancing state resulting in invalid states which ultimately cause some sort of array access error. It could be something as simple as the unit behaviour does not change until next frame. It could also be that the system design just does not support more than 1 death per frame.
Thanks for the quick replies, after a few hours of tedious tearing apart all my triggers I finally found the evil culprit. I was using the wrong trigger for adding the new behavior in. I was using the one with (Player) instead of the normal one. Such a tiny difference makes a huge impact ><"
Thanks again.
@Risquetal: Go
Something like picked player instead of picked integer? That'll get ya every time.