- Joined
- Mar 26, 2019
- Messages
- 55
I have just used World Editor recently. When I look at the forum, I always see that people prefer using temp variable than not. Can I ask the differents between two trigger down here? Which trigger is better?
-
Untitled Trigger 001 Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to War Stomp
-
-
Then - Actions
-
Set temp_point = (Position of (Triggering unit))
-
Set temp_group = (Units within 350.00 of temp_point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True))
-
Custom script: call RemoveLocation(udg_temp_point)
-
Unit Group - Pick every unit in temp_group and do (Actions)
-
Loop - Actions
-
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real((Strength of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
-
-
-
Custom script: call RemoveGroup(udg_temp_group)
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Untitled Trigger 001
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to War Stomp
-
-
Then - Actions
-
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real((Strength of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
-
-
-
Unit Group - Remove all units from (Last created unit group)
-
-
Else - Actions
-
Do nothing
-
-
-
-