- Joined
- Jul 14, 2011
- Messages
- 3,213
In a map i'm making, units have Tree Chop (Based on Night Elf Eat Tree ability), and a quest is based on killing an specific tree. I'd like to know if i can use 'Event Response - Killing unit' or 'GetKillingUnit()' to play a sound for that unit.
I know i have to check some stuff, the trigger is not complete. I just want to know the Killing Part
EDIT: Just thinking about it: If GetKillingUnit() doesn't work for destructibles, does "Pick every unit around destructible and do actions would work?"
EDIT: This is the trigger using Pick Every Unit and works, so far. At least the sound is played, and the other actions also take place, though I haven't done any test with other players at the same time.
-
Quest1TreeChop
-

Events
-


Destructible - Summer Tree Wall 0630 <gen> dies
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Amelia[(Player number of (Owner of (Killing unit)))] Equal to 1
-




Rose[(Player number of (Owner of (Killing unit)))] Equal to 0
-
-



Then - Actions
-




Custom script: if GetLocalPlayer() == GetOwningPlayer(GetKillingUnit()) then
-




Quest - Display to (All players) the Quest Update message: Main Quest Updated:...
-




Quest - Mark (Last created quest requirement) as Completed
-




Quest - Create a quest requirement for (Last created quest) with the description Talk to |cffffd700A...
-




Quest - Flash the quest dialog button
-




Sound - Play Secret_Found_01 <gen> at 100.00% volume, skipping the first 0.00 seconds
-




Custom script: endif
-




Set Amelia[(Player number of (Owner of (Killing unit)))] = 2
-




Set Rose[(Player number of (Owner of (Killing unit)))] = 1
-
-



Else - Actions
-
-


Wait 3.00 seconds
-


Destructible - Resurrect Summer Tree Wall 0630 <gen> with (Max life of Summer Tree Wall 0630 <gen>) life and Show birth animation
-
-
I know i have to check some stuff, the trigger is not complete. I just want to know the Killing Part
EDIT: Just thinking about it: If GetKillingUnit() doesn't work for destructibles, does "Pick every unit around destructible and do actions would work?"
EDIT: This is the trigger using Pick Every Unit and works, so far. At least the sound is played, and the other actions also take place, though I haven't done any test with other players at the same time.
-
Quest1TreeChop Copy
-

Events
-


Destructible - Summer Tree Wall 0630 <gen> dies
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in (Units within 125.00 of (Position of Summer Tree Wall 0630 <gen>) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Amelia[(Player number of (Owner of (Picked unit)))] Equal to 1
-






Rose[(Player number of (Owner of (Picked unit)))] Equal to 0
-
-





Then - Actions
-






Custom script: if GetLocalPlayer() == GetOwningPlayer(GetEnumUnit()) then
-






Quest - Mark (Last created quest requirement) as Completed
-






Quest - Create a quest requirement for (Last created quest) with the description Talk to |cffffd700A...
-






Quest - Flash the quest dialog button
-






Quest - Display to (All players matching ((Owner of (Picked unit)) Equal to (Owner of (Picked unit)))) the Quest Update message: - Main Quest Update...
-






Sound - Play Secret_Found_01 <gen> at 100.00% volume, skipping the first 0.00 seconds
-






Custom script: endif
-






Set Amelia[(Player number of (Owner of (Picked unit)))] = 2
-






Set Rose[(Player number of (Owner of (Picked unit)))] = 1
-
-





Else - Actions
-
-
-
-


Wait 3.00 seconds
-


Destructible - Resurrect Summer Tree Wall 0630 <gen> with (Max life of Summer Tree Wall 0630 <gen>) life and Show birth animation
-
-
Last edited:

