ID:271861
 
How would I make my enemy respawn after death? All I've done so far is a little iconing and Zilal's beginer tutorial. Please help.
When it dies... make a new one?
In response to Mystic.Gohaku
Yah something like that were they come back after a little.
In response to Loser Mongoose
Well I was giving you an answer. For example, I assume you have a proc that checks for death. In the proc, after you delete the mob that died just sleep for however long you want and then after that sleep is over, created a new monster.
In response to Mystic.Gohaku
Mystic.Gohaku wrote:
In the proc, after you delete the mob that died just sleep for however long you want and then after that sleep is over, created a new monster.

You can't do this. All of an object's procs stop once it's been deleted. You can, however, just move that dead monster somewhere it can't do anything (so, loc = null), then after some amount of time, move it back to where it was, and reset all its stats using initial() so that it's alive again.
In response to Garthor
ummm well I don't under stand where to put it..... I'm not good at that stuff so could you tell me where to put it?
In response to Loser Mongoose
Well that's up to you... wherever you want it to go.
In response to Mystic.Gohaku
but how do I do the delay thing or whatever so it stays dead for a sec
In response to Loser Mongoose
Ok here's a generic example. This is just generic so it probably won't work with your code, so don't expect to just copy and paste.

mob
verb
Attack(mob/M in oview(1))
M.hp -= usr.strength
M.deathcheck(usr)

mob
proc
deathcheck(mob/M)
if(src.hp <= 0)
M.exp += 100
src.loc = null
sleep(600) //Wait for a minute
src.hp = src.maxhp //Restore his HP
src.loc = locate(5,6,1) //And then move him back into play, this can be wherever you want it to be.
In response to Mystic.Gohaku
That doesn't really make sense to me..... Can you tell me if any guides tell you or something. I don't really understand. Can you tell me something that would work?
In response to Loser Mongoose
Read the DM Guide, because giving you an example is as simple as it gets.
In response to Lundex
Ok thanks