ID:158990
 
1. How do I make enimes respawn in the same place 50 seconds after they are killed? Here is my prototype(non-working) code:
var/type = src.type
var/X = src.x
var/Y = src.y
var/Z = src.z
del(src)
sleep(50)
new type (locate(X, Y, Z))

Can anyone tell me why it's not working, and possibly an alternative?

Second: For teleport pads, should i make the teleport an area or a turf?
Neos300 wrote:
1. How do I make enimes respawn in the same place 50 seconds after they are killed? Here is my prototype(non-working) code:
> var/type = src.type
> var/X = src.x
> var/Y = src.y
> var/Z = src.z
> del(src)
> sleep(50)
> new type (locate(X, Y, Z))
>

Can anyone tell me why it's not working, and possibly an alternative?

Second: For teleport pads, should i make the teleport an area or a turf?


I'd use a proc for respawning,
then call the proc later.
I use world.Repop()

Second, I'd use a turf.
I don't think areas are allowed icons are they?
well, if you want your teleporter to be visible, I'd suggest using turf.
=]
In response to KeyWielder000
Ok thanks.. But would world.RePop() respawn the mob i'm using or everything?
In response to Neos300
it respawns everything.


you could always manually create the mob at it's location.
using sleep()
and then creating it on the map.
In response to KeyWielder000
Okay, but how would i create the mob?

(Yes, i'm very, very, new to BYOND)
In response to Neos300
Actually I just posted a request for that code.

I think its..

//var defining
mob/var
Q = 0

// the code
var/mob/Q=new/mob/(npcname)
Q.loc=(x,y,z)
In response to KeyWielder000
Ok thanks