I have a trigger which rewards players for making a kill (noted below).
The trigger works successfully, but I notice there are two main problems with it. It is fine if a player creates a viking or tank, and it is killed before it can transform, then the killing player receives their due reward.
HOWEVER, if the unit transforms, then the kill reward is always 0. This is a massive problem since it allows players going tank or viking heavy to have their enemies lack an adequate reward for killing their stuff. I presume it's a data problem. The tank and viking also have the same cost, regardless of their respective mode, so it's not be just forgetting to fill in a field.
The secondary concern, which is less important as it affects game play less gratuitously, is when the killing unit does not exist. The trigger then throws up an error message for everyone about array index of the unit (which does not exist anymore) is out of bounds. How can I tweak the trigger so that it accounts for that possibility?
Thank you very much! I think this has sorted everything :)
I have a trigger which rewards players for making a kill (noted below).
The trigger works successfully, but I notice there are two main problems with it. It is fine if a player creates a viking or tank, and it is killed before it can transform, then the killing player receives their due reward.
HOWEVER, if the unit transforms, then the kill reward is always 0. This is a massive problem since it allows players going tank or viking heavy to have their enemies lack an adequate reward for killing their stuff. I presume it's a data problem. The tank and viking also have the same cost, regardless of their respective mode, so it's not be just forgetting to fill in a field.
The secondary concern, which is less important as it affects game play less gratuitously, is when the killing unit does not exist. The trigger then throws up an error message for everyone about array index of the unit (which does not exist anymore) is out of bounds. How can I tweak the trigger so that it accounts for that possibility?
Any help, thanks.
REFERENCE: http://tinypaste.com/c477c384