When i use my movement lock code my screen goes blank
mob/var/l=0
mob/proc/lock_movement()
if(usr.l)
usr.l = 1
return
else
..()
mob/Move()
usr.lock_movement()
ID:261512
May 24 2002, 8:09 am
|
|
In response to Lummox JR
|
|
i did what you said and it still doesn't work i can now see stuff but when i tell it to lock the movement then nothing happens
|
In response to Knuckles skater
|
|
Knuckles skater wrote:
i did what you said and it still doesn't work i can now see stuff but when i tell it to lock the movement then nothing happens You'd have to show the new code, then. Lummox JR |
In response to Lummox JR
|
|
i tryed this but it doesn't work
mob/var/l=0 mob/proc/lock_movement() if(usr.l) usr.l = 1 return else ..() mob/Move() if(usr.l) usr.l = 0 return else return ..() |
In response to Knuckles skater
|
|
Knuckles skater wrote:
i tryed this but it doesn't work Questions:
|
Three problems: You need "return ..()" or ".=..()" instead of just ..(), you're not returning the return value of lock_movement() from Move(), and you shouldn't be using usr anywhere in there.
I'm not sure why you're farming all this out to another proc anyway; it's causing one of your problems, and it's of no benefit to you.
Lummox JR