Moderator
M
Moderator
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
15:23, 20 Oct, 2012
Magtheridon96:
There's some room for improvement:
- You can cache things like (Triggering unit) and (Owner of (Triggering unit)) instead of repeating them more than once because function calls in this game are pretty slow :/
- Instead of having like 12 events for each trigger involved in commands, you can iterate from 1 to 12 on map initialization and add the events to the triggers yourself.
This way, you avoid generating 12 lines of code for event registration for each trigger, but instead, just 6-8 for all the command triggers combined
- If a dummy unit (or any other unit that must have it's death-type set to "Can't raise, does not decay") is given an expiration timer, the unit will not be totally removed from the game, so you're going to have to add one extra trigger that runs upon unit-death. This trigger would check if the type of the unit is equal to the dummy-type that you're using here, and then it would remove it from the game.
IcemanBo: Too long as NeedsFix. Rejected.
15:23, 20 Oct, 2012
Magtheridon96:
There's some room for improvement:
- You can cache things like (Triggering unit) and (Owner of (Triggering unit)) instead of repeating them more than once because function calls in this game are pretty slow :/
- Instead of having like 12 events for each trigger involved in commands, you can iterate from 1 to 12 on map initialization and add the events to the triggers yourself.
This way, you avoid generating 12 lines of code for event registration for each trigger, but instead, just 6-8 for all the command triggers combined
- If a dummy unit (or any other unit that must have it's death-type set to "Can't raise, does not decay") is given an expiration timer, the unit will not be totally removed from the game, so you're going to have to add one extra trigger that runs upon unit-death. This trigger would check if the type of the unit is equal to the dummy-type that you're using here, and then it would remove it from the game.