ID:266202
Sep 18 2001, 2:03 pm
|
|
How would i make if the mob is an ncp it gets deleted if health<=0, and usr mobs goto another world?
|
In response to Nadrew
|
|
Nadrew wrote:
Air _King wrote: Can you explain what it does?(I wan't to learn it not just use it) |
In response to Air _King
|
|
Air _King wrote:
Nadrew wrote: Wait I think I get it, if they don't have a client delete them? |
In response to Air _King
|
|
Air _King wrote:
Air _King wrote: Yep. I just answered another fellow who had relevance to your question. Here ya go: [link] |
In response to Vortezz
|
|
Vortezz wrote:
Air _King wrote: <font color=blue>thanks!!!</font> |
In response to Air _King
|
|
Air _King wrote:
Vortezz wrote: Ok now i am wondering why this doesn't work: proc/Repop() world.Repop() sleep(50) It compiles fine, but after i wait 5 seconds in the world after i destoyed a mob it doesnt repop!Why?Am I doing something wrong? |
In response to Air _King
|
|
Air _King wrote:
Ok now i am wondering why this doesn't work: I'm wondering how you could think that works. proc/Repop() That's because you're overwriting the already-written Repop() proc to call itself every 5 seconds, and do nothing. There's two options. You could rename this Repop() proc to stop the conflictions, OR... Tag in a ..(). |
In response to Vortezz
|
|
That's because you're overwriting the already-written Repop() proc to call itself every 5 seconds, and do nothing. Uh huh. To do that he'd need: world/Repop() and not proc/Repop() In fact, if prop/Repop() were overriding another proc, it wouldn't compile. His problem, I think, is in putting the sleep after the world.Repop() call, when it should be the other way around. I couldn't really understand what the problem was. Its also possible that the proc is never getting called--he never really said. -AbyssDragon |
In response to Vortezz
|
|
Vortezz wrote:
Air _King wrote: I tried making it look like this: proc/Rrepop() world.Repop() sleep(50) (changing the name of the proc) AND: proc/Repop() world.Repop() sleep(50) ..() It wont work once i try it in the world. |
In response to Air _King
|
|
Air _King wrote:
It wont work once i try it in the world. Are you calling the proc? Show me how you're calling it. [link] |
In response to Vortezz
|
|
Vortezz wrote:
Air _King wrote: proc/rrepop() world.Repop() sleep(50) ..() AND world/proc/rrepop() world.Repop() sleep(50) ..() |
In response to Air _King
|
|
Heh. Thats crazy.
A) You only need one or the other. 2) Thats just defining the proc, not calling it. Somewhere else, like in the code where an enemy dies (if I am understanding your problem correctly), call the proc. -AbyssDragon |
In response to AbyssDragon
|
|
AbyssDragon wrote:
Heh. Thats crazy. GOT IT!!! |
In response to Air _King
|
|
Air _King wrote:
AbyssDragon wrote: It works, but the game says: Cannot execute null.rrepop(). proc name: rrepop (/proc/rrepop) usr: [Master GM] Air _King (/mob/knight) src: null call stack: rrepop("") [Master GM] Air _King (/mob/knight): Attack(null) |
In response to Air _King
|
|
Air _King wrote:
Air _King wrote: nevermind i was still using the ..() and it must have been calling it twice and sine the mob was already there it hadd an error. |
In response to Air _King
|
|
Air _King wrote:
Air _King wrote: STOP REPLYING TO YOUR OWN POSTS THERE IS A SUCH THING AS A EDIT/DELETE BUTTON!! |
add this into your death code
if(M.client==null)
del(M)