- Joined
- Sep 20, 2020
- Messages
- 4
When it comes to triggers which use a dummy unit to cast an ability, which is more efficient?
Having a dummy unit pre-placed in the editor which is moved around the map when called for by a trigger and just giving the dummy unit all the abilities it will potentially need in the object editor?
Or each time a trigger requiring a dummy unit is activated, have that trigger create a dummy unit with an expiration timer at a given point?
If triggers are being activated at a very fast rate, will one permanent dummy unit be able to keep up?
Thank you
Having a dummy unit pre-placed in the editor which is moved around the map when called for by a trigger and just giving the dummy unit all the abilities it will potentially need in the object editor?
-
Horn of Helm Hammerhand Copy Copy
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Sound the Horn of Helm Hammerhand (The Horn of Helm Hammerhand)
-
-
Actions
-
Sound - Play The_Horn_of_Helm_Hammerhand__ISOLATED_AUDIO_u <gen>
-
Unit Group - Pick every unit in (Units in Helms Deep <gen>) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(PickedUnit belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
-
(PickedUnit is alive) Equal to True
-
(PickedUnit is A structure) Not equal to True
-
-
Then - Actions
-
Set VariableSet tempPoint = (Position of PickedUnit)
-
Unit - Move Ability Unit 0331 <gen> instantly to tempPoint
-
Unit - Order Ability Unit 0331 <gen> to Undead Necromancer - Cripple PickedUnit
-
Custom script: call RemoveLocation (udg_tempPoint)
-
-
Else - Actions
-
-
-
-
-
Or each time a trigger requiring a dummy unit is activated, have that trigger create a dummy unit with an expiration timer at a given point?
-
Horn of Helm Hammerhand Copy
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Sound the Horn of Helm Hammerhand (The Horn of Helm Hammerhand)
-
-
Actions
-
Sound - Play The_Horn_of_Helm_Hammerhand__ISOLATED_AUDIO_u <gen>
-
Unit - Create 1 Ability Unit for (Owner of (Casting unit)) at (Center of Helms Deep <gen>) facing Default building facing degrees
-
Unit - Add Cripple (Horn of Helm Hammerhand) to (Last created unit)
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Unit Group - Pick every unit in (Units in Helms Deep <gen>) and do (Actions)
-
Loop - Actions
-
Set VariableSet PickedUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(PickedUnit belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
-
(PickedUnit is alive) Equal to True
-
(PickedUnit is A structure) Not equal to True
-
-
Then - Actions
-
Set VariableSet tempPoint = (Position of PickedUnit)
-
Unit - Move (Last created unit) instantly to tempPoint
-
Unit - Order (Last created unit) to Undead Necromancer - Cripple PickedUnit
-
Custom script: call RemoveLocation (udg_tempPoint)
-
-
Else - Actions
-
-
-
-
-
If triggers are being activated at a very fast rate, will one permanent dummy unit be able to keep up?
Thank you
Last edited: