|
Post by sekira on Apr 22, 2008 14:34:39 GMT -5
I'm intrigued at how lua_get_rep_dir() and lua_get_aim_dir() work.
They both seem to return the direction in a single variable.
That makes sense for lua_get_rep_dir(), because it is just one of the 9 numberpad directions, and so dir is set to 1 through 9. I figured that out by looking at the Fighter Throw ability. That is also how I figured out how to modify Ki Punch to use fire_ball_specific_grid() to let it do damage to monsters standing in walls.
I'm really confused how the return value for lua_get_aim_dir() can return a single value and have that be enough information to target any grid location in the character's view. Is the return actually an array value, where one element of the array is the x offset and one is the y offset?
Thanks in advance for any info.
|
|
|
Post by Variaz on Apr 22, 2008 14:44:39 GMT -5
The main difference between the two functions is that aim can set a target, rep can't. The target code is not one of the 9 directions, it's another piece of hard-coded code, doing some calculations to calculate the path based on where the target is. Not something I played much with actually. Not something that I need to play with either.
|
|