ID:155750
 
Hi all. I have tried looking up this problem but I can't seem to get a straight solution for it. The screen goes blank when I run this code:

    var/canmove = 0

Move()
if(canmove == 0)
return
if(canmove == 1)
sleep 5
canmove = 1
..()


Unless you're placing the players on the map via loc = locate(), this will prevent the player from being placed at Login(). This is due to setting canmove to 0 by default.

mob
var
tmp
canmove = TRUE

Move()
if(!canmove)
return FALSE

return ..()
In response to LordAndrew
So how would I write that code? something like this:

mob

loc = locate(1,1,1)
var
tmp
canmove = TRUE

Move()
if(!canmove)
return FALSE

return ..()


I'm not sure how I would implement the locate() proc. Excuse me if I'm being such a newbie at this lol
In response to Saladon
You would place
loc = locate(1,1,1)
in either the mob/New() proc or in the mob/Login() proc.