Now, at the bottom of the coding for each pokemon I have this run:
New() //The built in proc that is called when you make a new mob.
..() //..() tells it to do the normal new stuff.
spawn(50)//After 5 tenths of a second "spawn" the following stuff.
AI()//Call the mobs AI proc.
And the AI proc does this:
mob
proc
AI()
if(src.rank=="Pokemon")
step_rand(src)
sleep(20)
step_rand(src)
sleep(20)
step_rand(src)
sleep(20)
step_rand(src)
sleep(20)
step_rand(src)
sleep(20)
src.AI()
else
return
Now here's the problem.. When you send out the pokemon, after it takes on your icon, it does the AI proc.
Obviously, this should happen, except on the SendOut verb I do this:
M.rank="Player"
So, your pokemon (that has your icon) shouldn't move at all.. but for some reason it still does, and it looks really weird to have what looks like your trainer randomly wander.
Anyone know what I did wrong?
NOTE: It stops wandering after a few steps.
EDIT: Also, if I return it, then send it out again, it works fine, no random wandering.