I have a map with a 'Circle of Power' hero selection system. I have too many heroes there so I decided to avoid the flood of 'Hero enters circle A --> Spawn Hero A' triggers.
Is my version better or should I use the commonly known system?
Here's my trigger:
(sorry I wrote this by hand because my editor isn't in english and it doesn't copy here properly)
Event:
A unit is given an order (unit -> object)
Condition:
(UnitType of (Triggering Unit)) is Wisp
(Owner of (Target unit of issued Order)) is Neutral-Passive
((Target unit of issued Order) is Hero) is True
Action:
- Explode unit (Triggering unit)
- if (Owner of (Triggering unit)) is Player 0 (Red)
then
Set (Spawn_point) = position of gg_unit_hcas0001
else
Set (Spawn_point) = position of gg_unit_hcas0002
- Create 1 (Unit-Type of (Target unit of issued Order)) for (Owner of (Triggering unit)) at Spawn_point
I wonder if it has more leaks that the common system. My thought that the game has to check every single time you make a 'unit->object' order so that can create lags, right? I cannot turn this trigger off because players can get more heroes during the game (this map has only 2 players).
So how can I improve this and make as leakless as possible?
Is my version better or should I use the commonly known system?
Here's my trigger:
(sorry I wrote this by hand because my editor isn't in english and it doesn't copy here properly)
Event:
A unit is given an order (unit -> object)
Condition:
(UnitType of (Triggering Unit)) is Wisp
(Owner of (Target unit of issued Order)) is Neutral-Passive
((Target unit of issued Order) is Hero) is True
Action:
- Explode unit (Triggering unit)
- if (Owner of (Triggering unit)) is Player 0 (Red)
then
Set (Spawn_point) = position of gg_unit_hcas0001
else
Set (Spawn_point) = position of gg_unit_hcas0002
- Create 1 (Unit-Type of (Target unit of issued Order)) for (Owner of (Triggering unit)) at Spawn_point
I wonder if it has more leaks that the common system. My thought that the game has to check every single time you make a 'unit->object' order so that can create lags, right? I cannot turn this trigger off because players can get more heroes during the game (this map has only 2 players).
So how can I improve this and make as leakless as possible?