• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Making Terrain Untargetable

Status
Not open for further replies.
Level 3
Joined
Nov 26, 2004
Messages
23
Is there a way by using Regions or the Targets Allowed Stat of an Ability to make a certain section of Terrain unable to be targeted by Spells which could normaly target the empty ground (ie. flamestrike, blink)?

I have a jump/leap type spell, which, much to my chagrin, has the unexpected side effect of permanently embedding its hero in a cluster of trees, rendering him unable to move. The jump/leap spell does use a trigger disabling and reenabling the Unit Collision, but when these triggers are not present the animation of it flying through the air glitches when passing over anything which it would normally collide with (ie. cliff walls). Thus I simply wish for this terrain to be untargetable. Otherwise I have to remake the spell :( .
 
Level 2
Joined
Jul 5, 2005
Messages
19
You can have it target anyway, then use an if statement to continue with the trigger (You are using triggers im assuming)

Then there are three functions that compare types of terrain you have a:

Terrain Type Comparision

and under Boolean Comparisions:

Environment - Point is Blighted
Environment - Terrain Pathing

My guess you will want Terrain Pathing, for it will return false for walkability for cliffs, trees, ect.
 
Level 3
Joined
Nov 26, 2004
Messages
23
So why doesnt this work then?


Events
- Unit - A unit Starts the effect of an ability
Conditions
- ((Ability being cast) Equal to Leap) and ((Terrain pathing at (Target point of ability being cast) of type Walkability is off) Equal to False)
Events
-Big scary code thing


In theory, or at least in my head, this should cause the ability to not do anything if it isnt targeted on a terrain type that isnt able to be walked upon.

Unless I'm blind, and don't see something wrong, or just plain stupid, this should work, yet it still causes the poor unfortunate being to still be imprisoned by trees.
 
Level 2
Joined
Jul 5, 2005
Messages
19
I guess I should have assumed you tried that (Jump spell is pretty complicated, requires enough knowledge not to overlook those functions) accually now i recall havinga similar problem in tring to add water pathing to water that i created by making the ground lower. The pathing functions don't seem to work very well, maybe I should make a test map that allows you to play with the pathing by selecting ground and seeing what the results are...

EDIT: you are right, it doesn't work for trees, only cliffs. cliffs it says off, trees on. I guess cause its not really part of the map, only a doodad?
 
Status
Not open for further replies.
Top