P
Paladin
Guest
How do you make a trigger so that it kills a unit when it steps in certain terrain?
Code:
Walk off path
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units of type Civilian) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at (Position of (Picked unit))) Equal to Ashenvale - Grassy Dirt
Then - Actions
Unit - Kill (Picked Unit)
Else - Actions
Custom script: call DestroyGroup(GetLastCreatedGroup())