black
icon = 'black.dmi'
name = ""
Entered(mob/a)
if(istype(a,/mob/))
walk(usr,x+2)
usr.loc = locate(11,14,1)
usr.inair = 0
if(usr.kills >0)
usr.kills -= 0.5
else
..()
ID:272319
Jun 6 2008, 7:50 am
|
|
I was wondering how I would make this code so that right when you touch it you automatically get killed and you spawn.
|
In response to Popisfizzy
|
|
Tried it, Got an error, Bump: Undefined proc
obj/black |
In response to Element Hero creator
|
|
Er, whoops.
atom I still suggest you handle respawning in a /mob proc. |
In response to Popisfizzy
|
|
...
And YOU'RE using usr in Respawn(), which is a proc. For heightened irony: it's a prime example of why you SHOULDN'T be using usr in such procs. |
In response to Garthor
|
|
Yea, I totally screwed up when writing that. Except for the usr part, I don't know what I was thinking when I wrote that. About the usr part, I was copying from his code and missed replacing usr with the proper variable (which is just making it kills).
|
Also, you're using usr in Entered(). Never use usr in procs, but especially never use it in movement-related procs. That's a no-no of the highest order.