Detect if unit is in or near water?

NeuroToxin

New Member
Reaction score
46
I wanted to know, is it possible to detect if a unit is in or near water?

Well thats the question :p
Sincerely, Neuro
 

HydraRancher

Truth begins in lies
Reaction score
197
I wanted to know, is it possible to detect if a unit is in or near water?

Well thats the question :p
Sincerely, Neuro

As far as I'm aware, water cannot be detected without using terrain types, but that would take checking in a huge radius. You could use regions I suppose; that's probably you're only option.
 

Rakaesa

Member
Reaction score
5
I'm not sure if there's a trigger in GUI or JASS to detect water itself, but you could make regions over the areas with waters and then just detect if the unit is near those regions. It's a bit of work, but i'm not sure of any other way. Sorry.

Edit: Why does that ALWAYS Happen? Lol. I finally find a way to get REP by a question I know I can answer with no other answers, I go to post and somebody beats me to it at the last second. AH well.
 

BlackRabbit

New Member
Reaction score
3
Not to beat a dead horse, but yeah, regions are your only way. Just figured I'd put in my positive affirmation on the subject =P

Edit: Maybe not your only way, but the easiest.
 

Sajin

User title under construction.
Reaction score
56
You could create dummy units(in the water) and every time someone comes within say 400 of those units then their near the water, regions are easier yes but also if you want it to only be in the water then your limiting yourself to the style of the terrain or you have to deal with a hell of a lot of regions if you made more complicated terrain
 

BlackRabbit

New Member
Reaction score
3
Actually, what Sajin said makes sense. I've never used dummy units, so I have no idea, but yeah. Regions would limit you to what you built your terrain like. Hey Sajin, any good links on dummy unit tutorials? Figured it'd be something important later on in my mapmaking career.
 

Sajin

User title under construction.
Reaction score
56
Actually, what Sajin said makes sense. I've never used dummy units, so I have no idea, but yeah. Regions would limit you to what you built your terrain like. Hey Sajin, any good links on dummy unit tutorials? Figured it'd be something important later on in my mapmaking career.

http://www.thehelper.net/forums/showthread.php/26751-Spells-Dummy-Casters <- one using dummys in abilities.

To use dummys in this situation, you cant use the locust ability with it though, youd need to some how implment it in your map/area, such as makeing the unit a fish in the river and make one every 600 or so around the river.

The problems that might arise is that you might have blind spots in the range if the editor uses the *pick all units in range* action, selecting in a circle.
 

DioD

New Member
Reaction score
57
you allowed to chack patching type of cells, just check patching around unit in some range.
 

tommerbob

Minecraft. :D
Reaction score
110
You could create a dummy unit with the submerge ability at the position of your unit, and order the dummy unit to submerge. Then check if his current order is submerge?

I did a similar thing with checking if a destructible is a tree.
 

Medeam

New Member
Reaction score
3
The methods which all(except DioD) of you came up with are very poor (sorry if I have offended you).
As well this method works with any type of terrain and any style whether its curved or whatever.

Method Example Is Below.

If you don't want to test it with world editor which would take four to seven seconds to start up and load then what this is, is pathing like DioD said earlier in this thread.
 

Attachments

  • simple and poor example made in 10 seconds.w3x
    17 KB · Views: 273
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top