• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Boundaries and Cliffs...

Status
Not open for further replies.
For the boundaries thing, you can either use:
  • Set Point1 = (Position of (Unit))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Playable map area) contains Point1) Equal to False
    • Then - Actions
      • Unit - Kill (Unit)
    • Else - Actions
  • Custom script: call RemoveLocation (udg_Point1)
Of course these action will be used in a periodic event, to check the unit's position over time.

For the cliffs, since the result depends on the initial cliff level you have used in your map, make this test: Make a cliff and place a footman on it; then, in the Map Initialization, display the message: "(Terrain cliff level at (Point))" [where Point = (Position of Footman 0000 <gen>)]. Let's say it returns 3.

Then, just like the boundaries periodic check, make an additional check as:
  • Set Point1 = (Position of (Unit))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions)
        • ((Playable map area) contains Point1) Equal to False
        • (Terrain cliff level at Point1) Greater than or Equal to 3
    • Then - Actions
      • Unit - Kill (Unit)
    • Else - Actions
  • Custom script: call RemoveLocation (udg_Point1)
 
I realised what you're after and that one works. There are additionally three ways:

1) Check if the offset point has flyability and walkability; if yes, move the unit, else, kill it.

2) Use the old classic way of a hidden item in front of your unit that checks the same as (1).

3) Use this script that does the same thing: http://www.wc3c.net/showthread.php?t=102576
 
Status
Not open for further replies.
Top