• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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,240
  • 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