How to do this? (hard)

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
Base Ability: Shockwave

All I want it to do is not work on land, only working on water. If it is casted on land, it would stop the ability.

I assume I need a way to compare pathing of the target area, but I have no clue how to do this. Advice is needed, thanks!
 

wonderpriest

New Member
Reaction score
18
Use terrain type comparison to see if the casting unit is on water. If not, then do something to make it stop, like order it to stop, remove and add the ability fast, etc. You might also want to send an error message to the player saying that he can't cast on land.
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
I'm at terrain-type comparison, but where's the response "water" ? I just see a bunch of tiles/cliffs.
 

Luth

Lex Luthor!
Reaction score
41
You can check the cliff level. Most of the time, shallow water is at, say, level 3, deep water level 2, and walkable ground at 4+. If that works for your map, you can find the condition under Integer Comparison.
 

Luth

Lex Luthor!
Reaction score
41
Happy to get rep... err, help! Yeah, happy to help! :p hehe

I did something similiar in one of my maps, but I've never seen it mentioned on this forum. Now you can tell the next guy who asks. :cool:
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
It was a contest on wc3campaigns these days, which theme was water casting spells(exactly what you asked). You can look in their code, maybe you find other ways. :)
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
I gave you rep before I even saw the post above. :cool:

Thanks for telling me about the wc3c contest. I may check it out if I have time, but I want to finish the map I'm working on asap, so I can play it with friends :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top