ID:176344
 
hmm well Death check is A basic thing but im having problems with it.. Heres Part of my death check...If an ally dies...It Suppost to create a Dead mob, Delete the ally it self, then after that create another mob, then waits six ticks, Then Create a zombie, and it deletes the one that was created before happens (You should be able to check it)...Please help me!

mob/proc/DeathCheck()
if(istype(src,/mob/allies))
if(src.hp == 0)
if(src.raising==1)
return
src.raising=1
var/mob/Zombieh/B
var/mob/dead/a
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a,loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
if(src.hp == -1)
src.raising=1
var/mob/Zombieh/B
var/mob/dead/a
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
if(src.hp == -2)
src.raising=1
var/mob/Zombieh/B
var/mob/dead/a
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/dead(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
if(src.hp == -3)
src.raising=1
var/mob/Zombieh/B
var/mob/dead/a
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
if(src.hp == -4)
var/mob/Zombieh/B
var/mob/dead/a
src.raising=1
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
if(src.hp == -5)
var/mob/Zombieh/B
var/mob/dead/a
src.raising=1
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(a)
if(src.hp == -6)
var/mob/Zombieh/B
var/mob/dead/a
src.raising=1
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)
mob/proc/DeathCheck()
if(istype(src,/mob/allies))
if(src.hp<=0)
if(src.raising)
return
src.raising=1
var/mob/Zombieh/B
var/mob/dead/a
new/mob/dead(src.loc)
del(src)
sleep(100)
new/mob/Zombieh(a.loc)
del(a)
sleep(6)
new/mob/Monsters/Zombie(B.loc)
del(B)


RaeKwon
In response to RaeKwon
RaeKwon wrote:
mob/proc/DeathCheck()
> if(istype(src,/mob/allies))
> if(src.hp<=0)
> if(src.raising)
> return
> src.raising=1
> var/mob/Zombieh/B
> var/mob/dead/a
> new/mob/dead(src.loc)
> del(src)
> sleep(100)
> new/mob/Zombieh(a.loc)
> del(a)
> sleep(6)
> new/mob/Monsters/Zombie(B.loc)
> del(B)

RaeKwon

...That cleaned it up, i would normally have it like that Normally But i diddnt do that to begin with, cause i wasnt changing the mob..and it keept repeating each time he/it got attacked, any way it still doesnt do what i want it to do.. (it doesnt create the Zombie, or the "Zombieh" all it does is delete the guy And create the Dead Guy. (hey im just wondering, me explaning, does it confuse any body :P, cause i normally get confused when i read what i say) lol.
In response to Wanabe
Try a = new /mob/dead(src.lco)

-<font color="#33ff33">Nova</font>
In response to Nova2000
Nope doesnt help, btw you spelt loc wrong (but its obvious that its a typo..)
In response to Wanabe
Ooops, yeah. That should be .loc, good catch.
In response to Nova2000
Man...I wonder why it doesnt work? Must be somthing i did wrong some where....Hmm but i dont know... :-\
In response to Wanabe
del(src) will stop the execution of a proc, unless if you've modified src's Del() proc. Move it to a later position.
In response to Garthor
K but i want it to delete the other mobs that it auto creates...Thanks, Also im going offline now so if you reply super fast i wont answer till tomorow or maybe in a few hours. Heres my death check now. It creates the Zombie, Fine, But it doesnt delete the "Zombieh" and the "dead" mob...they just stay there forever :-| Is there a way i can del them? i dont know how.

mob/proc/DeathCheck()
if(istype(src,/mob/allies))
if(src.hp<=0)
if(src.raising)
return
src.locked=1
src.raising=1
var/mob/Zombieh/M
var/mob/dead/a
new/mob/dead(src.loc)
del(a)
sleep(10)
src.raising=0
new/mob/Zombieh(src.loc)
sleep(6)
new/mob/Monsters/Zombie(src.loc)
del(M)
src.locked=0
del(src)
In response to Wanabe
Wanabe wrote:
K but i want it to delete the other mobs that it auto creates...Thanks, Also im going offline now so if you reply super fast i wont answer till tomorow or maybe in a few hours. Heres my death check now. It creates the Zombie, Fine, But it doesnt delete the "Zombieh" and the "dead" mob...they just stay there forever :-| Is there a way i can del them? i dont know how.
<code> mob/proc/DeathCheck() if(istype(src,/mob/allies)) if(src.hp<=0) if(src.raising) return src.locked=1 src.raising=1 var/mob/Zombieh/M var/mob/dead/a <font color="#dddd00">a = </font>new/mob/dead(src.loc) del(a) sleep(10) src.raising=0 <font color="#dddd00">M = </font>new/mob/Zombieh(src.loc) sleep(6) new/mob/Monsters/Zombie(src.loc) del(M) src.locked=0 del(src) </code>
Add the stuff in yellow... try that maybe.
Why do you have a var a and then immediatly delete it? (What's the point?) You create a mob/dead, and then just delete it. It'll either flash real quick, or you'll never even see it... so why's it there?

-<font color="#33ff33">Nova</font>
In response to Nova2000
Nova2000 wrote:
Wanabe wrote:
K but i want it to delete the other mobs that it auto creates...Thanks, Also im going offline now so if you reply super fast i wont answer till tomorow or maybe in a few hours. Heres my death check now. It creates the Zombie, Fine, But it doesnt delete the "Zombieh" and the "dead" mob...they just stay there forever :-| Is there a way i can del them? i dont know how.
<code> > mob/proc/DeathCheck() > if(istype(src,/mob/allies)) > if(src.hp<=0) > if(src.raising) > return > src.locked=1 > src.raising=1 > var/mob/Zombieh/M > var/mob/dead/a > <font color="#dddd00">a = </font>new/mob/dead(src.loc) > del(a) > sleep(10) > src.raising=0 > <font color="#dddd00">M = </font>new/mob/Zombieh(src.loc) > sleep(6) > new/mob/Monsters/Zombie(src.loc) > del(M) > src.locked=0 > del(src) > </code>
Add the stuff in yellow... try that maybe.
Why do you have a var a and then immediatly delete it? (What's the point?) You create a mob/dead, and then just delete it. It'll either flash real quick, or you'll never even see it... so why's it there?

-<font color="#33ff33">Nova</font>

I do see it, the sleep is that quick Just so i can see if the rest actully works, instead of waiting how long i had it in for... :|..also im about to try what you added, hope it works.

Hey thanks! it works :-P