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)
 
Status
Not open for further replies.
Back
Top