ID:267314
 
Iv just made my first game but when I kill the monsters the dont reapear. Can someone plz give me the code so that they do restore.
RPG Pro wrote:
Iv just made my first game but when I kill the monsters the dont reapear. Can someone plz give me the code so that they do restore.

I can think of two ways to do this:
mob/monster
proc/Killed()
spawn(100) // In ten seconds
new mob/monster(locate(x,y,z)) // Spawn a new one
Del(src)

(Note I didn't check that code)
or you could look up the Repop() function.

-<font color="#33ff33">Nova</font>
In response to Nova2000
Nova2000 wrote:
I can think of two ways to do this:
mob/monster
proc/Killed()
spawn(100) // In ten seconds
new mob/monster(locate(x,y,z)) // Spawn a new one
Del(src)

(Note I didn't check that code)
or you could look up the Repop() function.

Although it won't make much difference in this case, you should be calling del(), not Del().

Lummox JR
In response to Lummox JR
I tried that but an error keeps coming up so is there any other way?
RPG Pro wrote:
Can someone plz give me the code so that they do restore.

http://bwicki.byond.com/ByondBwicki.dmb?TheCode

Look up some fighting demos, they are definetly bound to have the monster reapearing code.