In response to Element Hero creator
...Now my npc's are walking diagonally around me attacking me, making it so I can't attack them...
In response to Element Hero creator
I was wondering if I have to do something to the npc code because its buggy now, when I'm far away from the npc the npc doesn't walk towards me it tele's about 2 spaces each time and when hes attacking me he starts to go in diagonal directions.

mob
Blazes_Arcanine
icon = 'Growlith.dmi'
icon_state = "2"
desc = "Gym 2"
hp = 6500
maxhp = 6500
player = 0
strength = 245
gym2poke = 1
Battle = 1
Expg = 2
level = 140
monster = 1
Pokemon = 1
PK = 1
NPC = 0
New()
. = ..()
spawn()
Wander()
proc/Wander()
while(src)
var/mob/Pokemon/P = locate() in oview(src)
var/mob/Trainer/T = locate() in oview(src)
if(P)
step_towards(src,P)
if(T)
step_towards(src,T)
else
step_rand(src)
sleep(5)

sleep(5)
spawn(5)
Wander()
Bump(mob/M)
if(ismob(M))
if(M.Trainer2 == 0)
Fight(M)
..()
else
return
proc/Fight(var/mob/M)
var/damage = src.strength
if(src.hp<=0 && src.desc == "Gym 1")
usr.BeatGym1 = 1
usr << "<font color = white><font face = 'Comic Sans MS'> You recieved a Swift Badge from Blake"
UserDcheck(src)
if(src.hp<=0 && src.monster == 1)
usr.BeatGym1 = 1
usr << "<font color = white><font face = 'Comic Sans MS'> You recieved a Cheri berry from [src]'s drop."
UserDcheck(src)
else
if(M.hp <= 0 && M.monster == 0)
M.hp -= damage
M << "<font color = white><font face = 'Comic Sans MS'>[src] attacks you for [damage] damage!!"
src<<"<font color = white><font face = 'Comic Sans MS'>You attack [M] for [damage] damage!!"
UserDcheck(M)
if(M.hp >= 0 && M.monster == 0)
M.hp -= damage
M << "<font color = white><font face = 'Comic Sans MS'>[src] attacks you for [damage] damage!!"
src<<"<font color = white><font face = 'Comic Sans MS'>You attack [M] for [damage] damage!!"
UserDcheck(M)
if(src.hp <= 0)
M << "<font color = white><font face = 'Comic Sans MS'>You have defeated [src]!"
UserDcheck(src)
In response to Element Hero creator
Well, I guess I'd have a var like sliding, and while you're sliding on the ice, it's true. Then I guess I'd modify the client direction procedures like North, South, East, West, ect.
In response to Element Hero creator
I thought thats what you said...

If you just wanted to move once thing use a variable to check if your moving.
Page: 1 2