ID:178373
 
mob/proc/damage(amount as num, mob/attacker)
src.health -= amount
if(src.health <= 0)
if(src == attacker)
src.loc = null
src << "You killed yourself!"
world << "[src] kills \himself"
src.score-=1
src << "You are dead, you must wait a few seconds to get back into the game"
sleep(100)
src.health = src.max_health
src.SetHealthIconState()
switch(alert(src,"Your ready to go back in!","Ok"))
if("Ok")
..()
src.SetHealthIconState()
src.loc = pick(locations1)
src.SetHealthIconState()
else
src.loc = null
attacker.score += 1
world << "[src] dies!"
src << "You are dead, you must wait a few seconds to get back into the game"
sleep(100)
src.health = src.max_health
src.SetHealthIconState()
switch(alert(src,"Your ready to go back in!","Ok"))
if("Ok")
..()
src.SetHealthIconState()
src.loc = pick(locations1)
src.SetHealthIconState()
else
return


Sometimes, when people die, they don't leave the map. It says, the person dies. I happens when they move. Like if they die when moving, they stay in the same spot... Gughunter has seen this last night during the test. Its kinda hard to explian.

Thanks for reading!

-ST
Have you done anything to overide mob/Move() or the client movement procs?
In response to Shadowdarke
mob/Move()
if(usr.walk == 1)
src.walk = 0
sleep(usr.wspeed)
src.walk = 1
..()
if(usr.hiding == 1)
usr.hiding = 0
usr.icon = usr.oldicon
usr.layer =MOB_LAYER+2
else
return 0


Just have that
In response to Sariat
Sariat wrote:
> mob/Move()
> if(usr.walk == 1)
> src.walk = 0
> sleep(usr.wspeed)
> src.walk = 1
> ..()


Your proc uses sleep(), which pauses execution of that program thread, then execute the default Move(). If someone is moved someplace else while the proc is sleeping, it goes ahead and Move()s the mob to it's target location when the sleep time is over.

Try this instead:
mob/Move()
if(usr.walk == 1)
src.walk = 0
spawn(usr.wspeed) src.walk = 1
..()

In response to Shadowdarke
Shadowdarke wrote:
Sariat wrote:
> > mob/Move()
> > if(usr.walk == 1)
> > src.walk = 0
> > sleep(usr.wspeed)
> > src.walk = 1
> > ..()

Your proc uses sleep(), which pauses execution of that program thread, then execute the default Move(). If someone is moved someplace else while the proc is sleeping, it goes ahead and Move()s the mob to it's target location when the sleep time is over.

Try this instead:
> mob/Move()
> if(usr.walk == 1)
> src.walk = 0
> spawn(usr.wspeed) src.walk = 1
> ..()


Thanks!