ID:142603
 
Code:
mob
proc
DeathCheck()
if(usr.hp <= 0)
world << "[usr] has died..."
usr.loc = locate(9,9,1)
usr.hp = usr.mhp
usr.Str=100
usr.AttackDelay=10
usr.MHP=100
usr.MP=0
usr.MMP=0
usr.player=1
usr.mgo=0
usr.lgo=0
usr.PK=1
usr.Def=100
usr.Lex=0
usr.Mex=0
usr.Delay=0
usr.Dario=0
usr.Mario=0
usr.Luigi=0
usr.Bowser=0
usr.Peach=0
usr.Yoshi=0
usr.DK=0
usr.Cfalcon=0
usr.Ganondorf=0
usr.Falco=0
usr.Fox=0
usr.Ness=0
usr.IC=0
usr.Kirby=0
usr.Samus=0
usr.Zelda=0
usr.Link=0
usr.Ylink=0
usr.Pichu=0
usr.Pikachu=0
usr.Jigglypuff=0
usr.Mewtwo=0
usr.Mr=0
usr.Marth=0
usr.Roy=0
turf
WeirdGrass
icon = 'item.dmi'
icon_state = "npit"
density = 0
layer = 100000000000000000000000000000000000000000000000000000000000000000000000
Entered()
src.icon = 'item.dmi'
src.icon_state = "opit"
density = 1
layer = 100000000000000000000000000000000000000000000000000000000000000000000000
usr.hp = 0
sleep(50)
del src
usr.DeathCheck()


Problem description:

My decription is that when you run into the pit your supposed to "die" and get send to loc = locate(9,9,1) but you dont die when you run into it all you do is lose your hp.. help?
also plz dont say nething about how high the layers are
The code! it burns...

READ THE GUIDE!

What's up with the high layers?
In response to Silicon Viking
1. i got this code from the guide
2. how does it burn exactly?
3. I SAID DONT SAY NETHING BOUT THE LAYERS

you didn't help me -.-
In response to SadoSoldier
SadoSoldier wrote:
1. i got this code from the guide

No, you didn't.

2. how does it burn exactly?

Because it's mangled beyond belief.

3. I SAID DONT SAY NETHING BOUT THE LAYERS

Too bad. You can't just ignore problems away.

you didn't help me -.-

The only person not helping you is you. Stop whining.
Read the guide. Also, what's with the absurdly high layers? Haven't we taught you anything?
In response to SadoSoldier
SadoSoldier wrote:
1. i got this code from the guide

If this code wasn't so sad I would've been ROFLing now.

2. how does it burn exactly?

HOW? MY EYES!!! TURN IT OFF, turn it off!
READ THE GUIDE. The DM Guide doesn't have SSBM code in it. So you couldn't have gotten that code from the guide.
In response to Garthor
There's probably more than this wrong with it, but meh..

            del src
<<< The Code stops here because src is deleted >>>
usr.DeathCheck()
In response to Iuss
Also, I don't think you're supposed to use usr in Entered()...
In response to Nickr5
Yeah. src is better in Entered().
SadoSoldier wrote:
Code:
> mob
> proc
> DeathCheck()
> if(usr.hp <= 0)


No put usr in proc. Ungh.


> turf
> WeirdGrass
> Entered()
> src.icon = 'item.dmi'
> src.icon_state = "opit"
> density = 1
> layer = 100000000000000000000000000000000000000000000000000000000000000000000000
> usr.hp = 0

No put usr in proc. Ungh. Press F1 in Dream Maker, look up Entered proc (atom) and use the arguments.
>           del src

Deleting src ends the proc. Why are you deleting the grass, anyways?
>           usr.DeathCheck()
>

No put usr in proc. Ungh.

also plz dont say nething about how high the layers are

Why not just use some decent numbers? Geez.

3. I SAID DONT SAY NETHING BOUT THE LAYERS

HOW BOUT U DONT SAY DONT SAY NETHING AND FIX IT INSTEAD

1. i got this code from the guide

No, you did not get this from the DM Guide. Do not lie. Never again.

Hiead
In response to Armiris
Armiris wrote:
Yeah. src is better in Entered().

No, src will be equal to the turf that the user enters, which isn't what he wants. He wants the first argument of Entered(), which tells what just entered the turf.
http://www.byond.com/docs/ref/info.html#/atom/proc/Entered
In response to Hiead
I didn't lie go look it up in ZIZALs tutorial -.- i just added variables onto it duh think before you speak plz -.-
In response to SadoSoldier
Yes, you did, and no, you didn't.
In response to Armiris
once again i got it from the all famous zizal guide
In response to SadoSoldier
No, you didn't, and it's "Zilal". Pay attention.
In response to Iuss
Tyvm i forgot about that ive had that problem before and some people who posted helped me as well, so ty to the people who did help.

To the people who said i didn't get it from a guide thats wrong. I got it from zizals tutorial thingy which has the deathcheck in it but i edited it to make it suit my game theres a reason for tutorials and guides.
In response to Garthor
close enough and yes i did i just added the hp the locate and the variables on to it if you looke at the top of the code its just like zilals and zizal sounds better >.>
In response to SadoSoldier
There is one line that I think you might've gotten from Zilal's tutorial:

proc


Everything else is a horrible mess which you did not get from Zilal's tutorial.
In response to Garthor
mob
proc
DeathCheck()
if(usr.hp <= 0)
world << "[usr] has died..."

all that came from his tutorial and then after it was just the usr locate, the variables and the usr.hp = usr.mhp(maxhp) and this thread is no longer needed so this is last post.
Page: 1 2