• 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.

[Trigger] Trigger condition recognizing water..?

Status
Not open for further replies.
Level 4
Joined
May 2, 2009
Messages
69
This has either a really simple solution that I just overlooked or one that would require JASS coding, which I have no knowledge in, but here goes:

Is there a way for me to set a condition for a trigger to check if there is water underneath a unit?

To give some background, I want to make an ability that fires a freezing arrow that will cause natural ice bridges to form as it passes over water. I know how I'm going to make the rest of the trigger, (involving an arrow-art unit with locust), and I've found a condition to check the terrain type, but it does not involve water in its contents, unfortunately.

If you need more information I'm ready to give it.
Help would be appreciated! Thanks!
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • walkaility
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at (Position of (Triggering unit)) of type Walkability is off) Equal to True
          • (Terrain pathing at (Position of (Triggering unit)) of type Floatability is off) Equal to False
        • Then - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: deep water
        • Else - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: not water or shallow water
It leaks: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

If you need to detect shallow water also:
  • walkability
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at (Position of (Triggering unit)) of type Floatability is off) Equal to False
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain pathing at (Position of (Triggering unit)) of type Walkability is off) Equal to True
            • Then - Actions
              • Game - Display to Player Group - Player 1 (Red) the text: deep water
            • Else - Actions
              • Game - Display to Player Group - Player 1 (Red) the text: shallow water
        • Else - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: not water
 
Status
Not open for further replies.
Top