When an enemies dies how do you make it so the spawn in it's original place?
ID:149584
Mar 31 2002, 1:07 pm (Edited on Mar 31 2002, 1:24 pm)
|
|
In response to Spuzzum
|
|
He never asked that. I even searched
|
In response to Buzzyboy
|
|
Buzzyboy wrote:
He never asked that. I even searched He never asked that, you're right. He answered that, and it's probably the best code for it I've ever seen. ;-) [edit] Since I don't know where it is either, however, I'll just repost it from my snippets list: //Credit to: Shadowdarke (slightly modified by Spuzzum) There you go. Enjoy. =) |
In response to Spuzzum
|
|
I can't find it though question or answer
|
In response to Buzzyboy
|
|
I edited my post to contain the snippet, since I couldn't find it either. =)
|
In response to Spuzzum
|
|
that won't work it's not going anywhere. is it because of the death check doesn't delete them?
|
In response to Buzzyboy
|
|
world/New()
status+="Beta" spawn while(1) sleep(40) for(var/obj in world) for(var/mob/M in world) sleep(100) Repop() this will respawn objects, and mobs as in monsters every 1 minuet, rather easy :) - RaeKwon |
In response to Buzzyboy
|
|
Buzzyboy wrote:
that won't work it's not going anywhere. is it because of the death check doesn't delete them? Yep, that'd be why. |
In response to RaeKwon
|
|
I have problems with each code.
for ShadowDarke's code it still won't respawn. for Raekwon's it says " Warning! could not find matching colour entry for white |
In response to Buzzyboy
|
|
Weird, try this.
world/New() spawn while(1) sleep(300) for(var/obj in world) for(var/mob/M in world) sleep(600) Repop() if it still does, its a BYOND bug, cause it doesnt for me. - RaeKwon |
In response to RaeKwon
|
|
Your indentation is wrong you have an empty for() loop.
|
In response to RaeKwon
|
|
same thing
|
In response to Nadrew
|
|
it works fine for me, i dont get any errors, in the months of codeing.
|
In response to RaeKwon
|
|
I tried making it a GM verb
and this it what it said runtime error: Infinite loop suspected. To avoid this safety check, set world.loop_checks=0 proc name: Repop (/proc/Repop) usr: \[Master GM] Buzzyboy (/mob/newbie) src: null call stack: |
In response to RaeKwon
|
|
Try this,it works fine for me.
world/New() If it doesn't something is REALLY wrong. -Kappa the Imp |
In response to Kappa the Imp
|
|
Okay, please re-read his post. He said that he doesn't delete mobs when they die.
If he wants either of these systems to work, he has to delete the mobs when they die. Of course, since he's not deleting mobs when they're killed, I don't see why he can't just add a variable like this: mob/var/respawn = 300 //30 seconds mob/var/turf/spawn_loc mob/New(loc) ..(loc) spawn_loc = loc mob/Death() //or whatever proc //do whatever spawn(respawn) //after 'respawn' ticks, src.loc = spawn_loc //return me to my spawn location //and do whatever else you need to do to make me new again |
Search back several hundred days using the Search tool for a post by Shadowdarke on the same subject, that's how.