• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Check to see if something is in water?

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