• 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.

Jump system which takes into account the pathing

Status
Not open for further replies.
Level 12
Joined
Feb 13, 2009
Messages
388
Greetings!

I've tried Paladon's jump system and it's great! But there's the problem: the hero jumps through walls, trees etc. How can I stop/forbid the jump if there's an unpathable obstacle on the way? Also I want the hero to be able to jump down the cliffs but unable to jump up.
 
Level 11
Joined
May 31, 2008
Messages
698
I dont think there is a way to make the unit not go thru doodads and such, but you can use this condition to see if the pathing shud be turned off
(Terrain cliff level at (Target point of ability being cast)) Less than or equal to (Terrain cliff level at (Position of (Triggering unit)))
Just go to the trigger and find where it say turn collision for casting unit off and use an "if then else" function put the above trigger for "if" and for "then" put turn collision off. This is also assuming that the jump spell is a target ability which im not sure if it is >.< but you should be able to figure it out. Good luck.

Rememer to give rep if this helped you :D
 
Level 12
Joined
Mar 16, 2006
Messages
992
You'll need to add a conditional to it that checks target position height and current position height.

wolfman, you ought to not post if you don't know what the hell you're talking about.
 
Level 12
Joined
Feb 13, 2009
Messages
388
Vegavak: +rep, it's really the position height I should check. However you shouldn't be that rude.

Wolfman: right, the problem was with "collision off". I turned it on and my hero cannot jump through doodads now. Thanks :) +rep with great willingness.

P.S> If you know how to do it: how to make the length (not height) of the jump smaller?
 
Level 11
Joined
May 31, 2008
Messages
698
There should be a couple ways to do what you want. There should be a part that sets the speed and that determines how long the unit will jump for. Making either of these values smaller will decrease the distance of the jump. Just look for a wait function.
A variable similar to this should set the speed of the jump:
Set Jumper_Move[(Player number of (Owner of (Picked unit)))] = ((Position of (Picked unit)) offset by (2.00 + (2.00 x (Real((Level of Jump for (Picked unit)))))) towards (Facing of (Picked unit)) degrees)

btw how do you check the position height, i couldnt find it.
 
Status
Not open for further replies.
Top