ID:161259
 
obj
var/tloc
New()
..()
src.tloc = src.loc
Del(respawn,respawnt)
if(respawn)
spawn(respawnt)
var/obj/K = new src.type(src)
K.loc = src.tloc
..()
del src
deltest
icon = 'deltest.dmi'
density=1
Click()
src.Del(1,60)


How could I make this kind of (manual-)spawn work?
I've no clue how I should do this. :/
Thanks for any help and the time.

Regards,

Rick
You have to give a value to respawn and respawnt. Or respawn will never become true..
In response to Subzero1
src.Del(1,60)

___>
In response to Sokkiejjj
Why don't you just make src.loc=null and then make the src.loc = tloc after respawnt ? It would make things easier and cleaner than deleting and creating new objs.
First of all: when you delete the object, all of its procs end, so the new object doesn't get to be created.

Second: do not try to shoehorn new arguments into Del(). Del() and New() should not be called directly, and you MOST DEFINITELY should not have del(src) in Del(). Fortunately, it doesn't reach that line because Del() finishes the line before, but still.

My suggestion is to make a global respawn() proc, like so:

proc/respawn(var/type, var/atom/location, var/time)
spawn(time) new type(location)


Then, call that.
In response to Garthor
Thanks Garthor.