Code:
verb
Attack(mob/M as mob in get_step(usr,usr.dir))
http://gyazo.com/4647cc270bf403d74721b4f5680047b9
Problem description: I seem to be posting here an awful lot anyways to the problem. I've created an attack verb and if I as i press attack it targets myself or brings up an input box to select the mob I'm attacking or myself. Any clues on how I could going about solving this issue? Screen shot provided below
Code: verb http://gyazo.com/4647cc270bf403d74721b4f5680047b9 |
Jun 27 2013, 9:51 am
|
|
That's a bit strange, but perhaps what you're looking for is:
|
Thanks i thought about trying that at first but dismissed it because I thought it would do the same thing.
|
Ah, I just remembered...you're using pixel movement.
Yeah, the issue is, since you're using pixel movement, your bounding box can occupy two tiles at once. So you can technically be in your get_step because of that. A better way to go about this would be to use: verb This would be more accurate for pixel movement. Albro1 came up with this btw. |