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

Check to see if something is in water?

Status
Not open for further replies.
Level 13
Joined
Apr 15, 2008
Messages
1,063
  • Conditions
    • (Terrain pathing at (Position of (Triggering unit)) of type Floatability is off) Equal to False
this condition works for both shallow/deep water. If you want to find out which one of those it is, you'll have to use this (for shallow water):
  • Conditions
    • (Terrain pathing at (Position of (Triggering unit)) of type Floatability is off) Equal to False
    • (Terrain pathing at (Position of (Triggering unit)) of type Walkability is off) Equal to False
For deep water change the second condition to "equals true"
 
Level 11
Joined
May 26, 2005
Messages
194
initus said:
Get location Z only calculates to the surface of the water

water always has the same Z (as long as you dont use terrain deformations which arent recommended anyways due to lagg), dont know whats about stomp and so on, but i use a height check in supcom, where performance is important...

quite a good idea to simply use the pathing type, i think i will benchmark it out
(benchmark script see signature :p its good^^)
 
Status
Not open for further replies.
Top