Code:
Problem description:
SO FRUSTRATED!!!!!!!!!!!!
okay got that out. So with byonds tiles and basic combat ussually you can do something like
for(var/mob/m in get_step(usr,usr.dir))
...attack code
but when you are moving less then a tile at a time thats when that method of attacking an enemy infront of you becomes wonky. My characters move 5 pixels at a time. So this means that sometimes even whens hes facing an enemy he can not attack with that code. This is because through through the five pixel movement when you start to go to up or down and attack your tile location moves down. Meaning that even when he may appear in front of you he is infact not in the direct tile space.
So my question is. IS there a way to counteract this. I don't need a fledged out example, just a place to start.
I've already tried multiple methods and after some thought realized they were a waste of resources and too complicated for something too simple.
Aug 7 2014, 2:03 pm
Best response
|
|
Here are two procs I took directly out of my own project that uses pixel movement:
|
thanks thats good help but im cofused about what this is
. = obounds(A, x, y, 0, 0) i dont know what obounds is or does |