• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Deadly terrain

Status
Not open for further replies.
tt8d_untitled.png

Can make deadly terrain (e.g. unit move to transparency grass "Black", Die). Can Do? (without region)
 
for event use: Unit enters region (Playable Map Area)?
No, a periodic trigger.

Save the location of the units that will die if they exit that area, save their locations to a point variable and then do a if/then/else terrain check at the saved location. Run the trigger at 0.1 or similar. Remember to clear the location when you are done using it.

Memory Leaks
Things That Leak
 
No, a periodic trigger.

Save the location of the units that will die if they exit that area, save their locations to a point variable and then do a if/then/else terrain check at the saved location. Run the trigger at 0.1 or similar. Remember to clear the location when you are done using it.

Memory Leaks
Things That Leak
Can u send a trigger example?
 
  • Kill Units On Abyss
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet TempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet TempLoc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • (Terrain type at TempLoc) Equal to Outland - Abyss
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
          • Custom script: call RemoveLocation (udg_TempLoc)
      • Custom script: call DestroyGroup (udg_TempGroup)
 
Level 23
Joined
Dec 4, 2007
Messages
1,558
^ That can work, but what if your trespassing unit is under the effect of spell immunity like avatar?
 
Status
Not open for further replies.
Top