• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] make ability only target walkable terrain

Status
Not open for further replies.
Level 26
Joined
Mar 29, 2020
Messages
1,468
hey there,

is there a way to make a point targeting ability (channel based) only target walkable terrain in the object editor? or does it have to be done manually with triggering?

also -this ability will have an aoe-type targeting image. if the above has to be triggered - is there a way to make the ability happen only in points within the aoe targeter that are walkable?

(for clarity - example - someone casts infernal with half the targeter over water, - the unit should appear but where the targeter is over land, but if the whole targeter is over water - shouldn't cast)

thanks!
 
Has to be done with triggers

And for the "walkable points within the radius", that can be done by checking the walkability-type of multiple points that are offset from the center of the target point.

So like:
East
Point[1] = Center point + X:50, Y:0
Point[2] = Center point + X:100, Y:0
North
Point[3] = Center point + X:0, Y:50
Point[4] = Center point + X:0, Y:100
West
Point[5] = Center point - X:50, Y:0
Point[6] = Center point - X:100, Y:0
South
Point[7] = Center point - X:0, Y:50
Point[8] = Center point - X:0, Y:100
Etc... for NE, NW, SE, SW

From there you'll have to figure out what to do with these points.
 
Last edited:
You could try tinkering around Tiny Castle item ability as this is an ability that uses Wc3 building mechanics (ie. you use a dummy building unit wth no model that recquires walkability placing).
If this doesn't work you will most likely need triggers: a spell cast event, a check walkability action, and maybe a sim error type system so to stop the caster and ability effects should the ability be used failing the walkability check. Also don't forget the neat Wc3 error sound and UI message.
 
Status
Not open for further replies.
Back
Top