ID:267398
 
when someone attacks you, you turn into a skelton for 5 seconds then i want it to disapear and for you to respawn my code is





proc/Die()
icon = 'skull.dmi'
sleep(50)



please help
You probably want to do the following things:

1) Create an /obj/skeleton at the player's location.
2) Set the player's loc to "null", and set his client.eye to the skeleton, and set the client.eye viewing mode to see things that the mob can't (see the Reference for this).
3) Sleep 50 ticks.
4) Do a "for" loop for all the turfs of type /turf/respawn. Try moving the mob to each one until he finds an unoccupied one. When you have a success, set the mob's client.eye back to the mob itself, and restore the client.eye viewing mode to normal.

If this list doesn't make sense to you, I recommend that you read the Blue Book (see the "DM Guide" link on the sidebar) before you go any further. Then you'll be ready to tackle this. Good luck!

In response to Gughunter
Nahh it worked great thanks!