Wrda
Spell Reviewer
- Joined
- Nov 18, 2012
- Messages
- 2,011
In the example Map Initialization event won't work, when adding units to the system. However, a 0s timer will be enough.
Either CloakingSystemAddUnit should add the ability 'abilcode' to the unit or the user has to manually add it, while at same time passing the ability id to the function. The instructions weren't very clear on this part. You can optimize CloakingSystemAddUnit function further by caching GetUnitUserData(u).
In CloakingSystemRemoveUnit, you can
In Cloaking System Periodic trigger, you can also use BlzGroupGetSize and cache Picked Unit too.
It does seem like a nice alternate approach to deal with the invisibility transition, although I like the standard one.
Very few things to be fixed, but some are quite important.
Either CloakingSystemAddUnit should add the ability 'abilcode' to the unit or the user has to manually add it, while at same time passing the ability id to the function. The instructions weren't very clear on this part. You can optimize CloakingSystemAddUnit function further by caching GetUnitUserData(u).
In CloakingSystemRemoveUnit, you can
if BlzGroupGetSize(udg_cloaking_system_unitgroup) == 0 then
instead CountUnitsInGroup
, since it's faster and better because it doesn't loop through all units. Also, the timer should be destroyed (pause first).In Cloaking System Periodic trigger, you can also use BlzGroupGetSize and cache Picked Unit too.
It does seem like a nice alternate approach to deal with the invisibility transition, although I like the standard one.
Very few things to be fixed, but some are quite important.