View Single Post
  #1  
Old 09-19-2010, 08:37 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default Find Nearest Object/Wall & Z value of floor @ point?

Forgive me as I am learning my way around the code - I couldn't find a function to identify the closest object / wall / whatever - is there one?

Reason: I am trying to implement the Shadow Knight AA Hate Step in the code. On live, this is an activatable AA that sends the SK forward x distance instantly; think Shadow Step, but always in the direction you are facing, for a fixed distance, unless you run into an object or wall, of course.

Right now, I have the code working for the spell ( no, the client didn't take care of this for me like it does with Shadow Step and yes, I added a break condition to the spell effect code switch ). The only problem is that I can go through walls and at the moment, I can't 'place' the character on the ground should the ground he is facing be lower than what he is on ( much less preventing him from going through a wall when the ground is slanted upwards ), since I don't know of a funciton to find the z value at a given point. So what I think I need is:

1. the ability to find objects / walls 'in the way' along a certain vector.
2. the ability to read the Z value of the map along said vector.

Anyone who knows the code that can point me to the functions I am looking for, if they exist?

Thanks!
Reply With Quote