When monsters on my game die, I want the map to be repopulated. So I looked up the Repop(), it seems simple enough, but I don't understand what I have to do to get it to work. I'm not sure where I have to put it so that I dont get any errors, or what to put in the "()"'s, if anything. Could somone please clear this up for me?
_________________
=The Bearded One=
_________________
ID:261290
Dec 2 2001, 6:40 am
|
|
Dec 2 2001, 5:50 pm
|
|
Within your deathcheck proc (or whatever you call it) where you check the if the client is null you need to call it something like this
|
In response to Light
|
|
Thank you Light, but I didn't work for me, what am I doing wrong?
if(src.typechar == "monster") if(src.HP <= 0) view() << "[src.name] dies!" del(src) sleep(10) world.Repop() |
In response to I Have A Beard
|
|
Move the Repop down one line and your indentation looks kind of off.
|
In response to Nadrew
|
|
Whoops, I don't know why it looks like that, it looks different in my coding.
if(src.typechar == "monster") if(src.HP <= 0) del(src) sleep(10) world.Repop() It get's no errors, but it doesnt repop. |
In response to I Have A Beard
|
|
I Have A Beard wrote:
Whoops, I don't know why it looks like that, it looks different in my coding. I have not used Repop, but I believe when you del(src), this proc dies along with the src, so it never gets to the rest of it. |
In response to Flick
|
|
Yes, that means you have to make a proc that does it before it's deleted:
proc I'm sure you can add that into your code. |