Forum Topic: my guy can not die

(252 views • 12 replies)

This topic is 1 page long.

<< < > >>
None

piggy123

Reply To Post Reply & Quote

Posted at: 5/5/09 12:07 AM

piggy123 NEUTRAL LEVEL 14

Sign-Up: 06/13/08

Posts: 924

if (_root.life<=0) { gotoAndStop("lose"); }

if something hits him he loses 5 life but even when he has less then 0 he does not die


None

Bujew

Reply To Post Reply & Quote

Posted at: 5/5/09 12:11 AM

Bujew EVIL LEVEL 07

Sign-Up: 07/26/08

Posts: 123

Can you give more details and how you did it? I'm trying to figure it out.

YO


None

DawnOfDusk

Reply To Post Reply & Quote

Posted at: 5/5/09 12:19 AM

DawnOfDusk EVIL LEVEL 14

Sign-Up: 02/22/08

Posts: 1,482

lawl, use trace.
See if his health ACTUALLY goes under 5.

google the trace function if you be unknowing of this useful debugging tool.

:: AS2: Main :: AS3: Main :: C++: Main :: I speak German =3

BBS Signature

None

piggy123

Reply To Post Reply & Quote

Posted at: 5/5/09 12:22 AM

piggy123 NEUTRAL LEVEL 14

Sign-Up: 06/13/08

Posts: 924

At 5/5/09 12:11 AM, Bujew wrote: Can you give more details and how you did it? I'm trying to figure it out.

if he bangs into spikes you lose 5 life you start with 100 and even when it goes under 0 it does not go to the game over screen


None

Bujew

Reply To Post Reply & Quote

Posted at: 5/5/09 12:37 AM

Bujew EVIL LEVEL 07

Sign-Up: 07/26/08

Posts: 123

The "lose" frame is located in the main timeline right?

YO


None

Bujew

Reply To Post Reply & Quote

Posted at: 5/5/09 12:40 AM

Bujew EVIL LEVEL 07

Sign-Up: 07/26/08

Posts: 123

Sorry for the double post but was this code placed in a frame or a movieclip?

YO


None

piggy123

Reply To Post Reply & Quote

Posted at: 5/5/09 12:42 AM

piggy123 NEUTRAL LEVEL 14

Sign-Up: 06/13/08

Posts: 924

At 5/5/09 12:40 AM, Bujew wrote: Sorry for the double post but was this code placed in a frame or a movieclip?

frame


None

Yambanshee

Reply To Post Reply & Quote

Posted at: 5/5/09 06:36 AM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

is your code being looped on a enterframe function then?

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

piggy123

Reply To Post Reply & Quote

Posted at: 5/5/09 04:10 PM

piggy123 NEUTRAL LEVEL 14

Sign-Up: 06/13/08

Posts: 924

At 5/5/09 06:36 AM, Yambanshee wrote: is your code being looped on a enterframe function then?

no thats the whole code


None

Loccie

Reply To Post Reply & Quote

Posted at: 5/5/09 05:37 PM

Loccie NEUTRAL LEVEL 16

Sign-Up: 02/27/04

Posts: 1,059

At 5/5/09 04:10 PM, piggy123 wrote:
At 5/5/09 06:36 AM, Yambanshee wrote: is your code being looped on a enterframe function then?
no thats the whole code

I think that I know your problem. When you enter this frame AS checks the if statement like expected but then no longer looks at it. You'll need an onenterframe.


None

FatKidWitAJetPak

Reply To Post Reply & Quote

Posted at: 5/5/09 10:22 PM

FatKidWitAJetPak LIGHT LEVEL 24

Sign-Up: 07/28/07

Posts: 3,785

I made you a sig piggy... yeah i know off topic but WHATEVS. :/

my guy can not die

The Fallout 3 Fan Club. Join Today!
Voice Acting TUTORIAL!
Click My Sig Below If You Need A Voice Actor! Oh And I Love Pancakes. ROOOOOOOOOAAAAAAAAARRRRRRRRRRR!!!

BBS Signature

None

Coolio-Niato

Reply To Post Reply & Quote

Posted at: 5/5/09 10:54 PM

Coolio-Niato LIGHT LEVEL 28

Sign-Up: 06/30/05

Posts: 1,774

At 5/5/09 05:37 PM, Loccie wrote:
I think that I know your problem. When you enter this frame AS checks the if statement like expected but then no longer looks at it. You'll need an onenterframe.
onEnterFrame=function(){
if (_root.life<=0) { 
gotoAndStop("lose"); 
}
}

=)

BBS Signature

None

piggy123

Reply To Post Reply & Quote

Posted at: 5/8/09 11:42 AM

piggy123 NEUTRAL LEVEL 14

Sign-Up: 06/13/08

Posts: 924

onEnterFrame=function(){
if (_root.life<=0) {
gotoAndStop("lose");
}
}

thanks that fixed it


All times are Eastern Standard Time (GMT -5) | Current Time: 03:02 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!