I have a problem with repopulating the world after something has been destroyed or deleted or whatever you wanna say, here's what I have;
world
New()
spawn
while(1)
sleep(10)
Repop()
return ..()
This way, everything is put back on the mop, even objs! And I only want mobs to be put back So I tried this;
world
New()
spawn
while(mob in world)
sleep(10)
Repop()
return ..()
This doesnt repop ANYTHING at all. Can somone help me please?
ID:261308
Dec 8 2001, 12:46 pm
|
|
Here is something that should do the trick:
mob
var
beginning_location
New(Loc)
..()
if(Loc) beginning_location = Loc
Del()
RepopMob(type,beginning_location) // calls a global proc so it will run after the mob is deleted
..()
proc
RepopMob(mobtype,location)
spawn(10)
new mobtype(location)