Well, a few weeks back I stumbled across a few useful proc's that I can't seem to find now that I'm actually looking.
I know it had some great features like getting a true direction (which I'd really like for my ai system)
If anyone can find this, or knows who made it, that would be great. Thanks!
ID:160196
![]() Oct 27 2008, 10:34 am
|
|
![]() Oct 27 2008, 11:18 am
|
|
This doesn't go here. I'm pretty sure Nadrew made it, though.
|
Check Spuzzums Snippet Database.
|
Thanks again; I've been battling with it for a while now, but am unsure of how to use the return values.
My attempt: var/direction My suspicion is that I'm returning a true value every time and the compiler isn't actually comparing the text, but rather just comparing that it's an empty text string or not. Does anyone know how I can use the return values easier? The var/return_val was my attempt at finding the real return value, but obviously I have no idea what I'm doing. Thanks! --Beatmewithastick EDIT: By the way, ignore the indentation, and yes, I know I could use a switch here. Just figured I'd point that out before anyone said anything. I just chose that to, and don't ask me why. :p |
This is demonstrating some very odd behavior when I actually try to apply it as movement, rather than a text value. How would I go about this?
|
Make sure you know what precise value the proc returns.
proc/advanced_direction_numeric(..args..) Then use this custom proc that converts the returned value to numbers first, instead. |
Way back, I wrote something that might be helpful to you: [link]
The get_approx_dir() function basically is like get_dir() but it will return cardinal directions when it's close enough. Lummox JR |