mob
Move()
spawn(src.movementdelay)
..()
mob/var/movementdelay = 2
client//I also overrode client movement...should this be in mob/Move() or is it fine here in client/Move()
Move()
if(!src.mob.MOVEMENT)
return
..()
For some odd reason, every time I try set up some sort of delay in movement I get a very weird issue my mob moves like this: --_-_-_-_-_--_-, Consider the path is supposed to be a straight line, and when I go to turn my direction, say down two squares then continue left, it jumps back and forth between moving down south and left, and just moving left without going down so it ends up jumping back and forth before it picks which it actually decides to do whether it be stay on the original square without moving down, or be on that lower square and continue moving left, Is there a proper way to do a movement delay that I'm not getting? It worked before... or I just never noticed the bug.
[second edit]
Whats a good way to do an AI Code...
Very basic demo of what I'm acctually doing for AI, but I'm wondering what would be ways to make a more efficient AI Code...
loop with while?
mob
proc
AI()
while(src)
//grab target with a loop of mobs in view
if(target.health>src.health)
src.Attack()
if(target.health<src.health)
src.Run()
Attack()
if(target in view(8))
//move towards, and see if you should still attack
//attack with either a ranged or close range attack
This is my run/walk code, I'm not sure if this is helpful for you in anyways, but it has to do with move delay so I thought you could take something from this :P.