Moderator
M
Moderator
12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.
March 28, 2013
Magtheridon96:
IcemanBo: Too long as NeedsFix. Rejected.
March 28, 2013
Magtheridon96:
- You're constantly running the timer and letting it expire throughout the game even while the trigger that runs whenever that timer expires is off. You should start the timer as a repeating timer with a certain interval (0.03 is recommended) when an instance is created, and you should pause the timer when there are no instances left.
- In CastArrow:
- Store the triggering unit into a variable and use that variable instead of calling Triggering unit more than once.
- Cache the level of the ability into a temporary variable.
- Use triggering player instead of the owner of the triggering unit.
- The ability should be stored into a variable for configuration in the Init trigger. You would then use that variable everywhere in your code instead of using the object directly. You would also avoid (Ability being cast) and just use the variable.
- This system still kills bridges and other important destructables. I'd only recommend destroying trees. You can pull this off by having a hidden dummy peasant unit created on map initialization and given the locust ability. This unit will be ordered to "harvest" the picked destructable. Directly after that, if his current order is "harvest", then that destructable is indeed a tree and you can proceed with killing it.
- The special effects created such as "Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl" should be configurable from the Init trigger.
- NEVER, and I mean NEVER, under any circumstances, should anyone be changing custom value, unless the resource is a Unit Indexer. Use a hashtable for data storage instead. I repeat, NEVER.
- You shouldn't have debug messages in there like that. (Especially when they're not very useful)
- KnockbackDamage should not be an array.
- Instead of repeating (Key handle), you can use an integer (TempInteger) that you would set via a custom scripts (
set udg_TempInteger = GetHandleId(udg_handle)
) - The ability you're adding and removing to units should be configurable from the Init trigger just like the main ability.
- You're leaking the group variable "Group". Destroy it in the Move Arrow trigger after you're done with picking the units inside it. (You would do this:
call DestroyGroup(udg_Group)
)