• 🏆 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!

Jump system which takes into account the pathing

Status
Not open for further replies.
Level 12
Joined
Feb 13, 2009
Messages
386
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
386
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