Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Ivisisable character problem

(407 views • 49 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
None

Doomsday-One

Reply To Post Reply & Quote

Posted at: 6/16/08 08:36 AM

Doomsday-One NEUTRAL LEVEL 08

Sign-Up: 10/28/05

Posts: 307

At 6/16/08 08:23 AM, regimag wrote: It won't work
**Error** Scene=Scene 7, layer=Layer 1, frame=26:Line 30: Syntax error.
if (_root.littleLlyod) hitTest (_root.ladyBug) {

Total ActionScript Errors: 1 Reported Errors: 1

Fix:
if ((_root.littleLlyod) hitTest (_root.ladyBug)) {

I never use hittest, but I think that's the problem...


None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/16/08 08:40 AM

GuyWithHisComp LIGHT LEVEL 23

Sign-Up: 11/10/05

Posts: 4,028

At 6/16/08 08:36 AM, Doomsday-One wrote: Fix:
if ((_root.littleLlyod) hitTest (_root.ladyBug)) {

hitTest is a function of the MovieClip class which returns a boolean (true or false).

if ( _root.littleLlyod.hitTest (_root.ladyBug) == true ) { }

Alternatively, you can skip the == true part since the statement is true just by the hitTest function.

if ( _root.littleLlyod.hitTest (_root.ladyBug) ) { }
BBS Signature

Sleeping

The-One-Banana

Reply To Post Reply & Quote

Posted at: 6/16/08 09:36 AM

The-One-Banana NEUTRAL LEVEL 10

Sign-Up: 12/12/07

Posts: 33

Um, perhaps something like this:

onClipEvent(enterFrame){
if(this.hitTest(_root.enemyname)){
if(invincibility == false){
this.health--
invincibility == true
counter == 60
//if you are not invincible, but come in contact with an enemy, you lose one health, and invincibility is activated, with a counter that has been set when you got hit.
}
}
if(invincibility == true){
counter--
//your invincibility won't last forever, so I set a counter so that there is a time limit to your invincibility.
if(counter==0){
invincibility = false
//once the counter hits 0, you are not invincible anymore.
}
}
}

That's all I can do for you, but if you can't comprehend this code, I strongly recommend you smarten up and review actionscript.


None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/16/08 09:47 AM

GuyWithHisComp LIGHT LEVEL 23

Sign-Up: 11/10/05

Posts: 4,028

Sorry for the english lesson but:
ivisisable & invincible != invisible

BBS Signature

None

Doomsday-One

Reply To Post Reply & Quote

Posted at: 6/16/08 09:49 AM

Doomsday-One NEUTRAL LEVEL 08

Sign-Up: 10/28/05

Posts: 307

At 6/16/08 09:47 AM, GuyWithHisComp wrote: Sorry for the english lesson but:
ivisisable & invincible != invisible

As tempted as I am to change the '&' to '&&', I shall resist the urge...

It should be an "or" operator anyway =)

None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/16/08 09:54 AM

GuyWithHisComp LIGHT LEVEL 23

Sign-Up: 11/10/05

Posts: 4,028

At 6/16/08 09:49 AM, Doomsday-One wrote: As tempted as I am to change the '&' to '&&', I shall resist the urge...
It should be an "or" operator anyway =)

That was EnglishScript. Not ActionScript.

EnglishScript != ActionScript
BBS Signature

None

Doomsday-One

Reply To Post Reply & Quote

Posted at: 6/16/08 11:16 AM

Doomsday-One NEUTRAL LEVEL 08

Sign-Up: 10/28/05

Posts: 307

At 6/16/08 09:54 AM, GuyWithHisComp wrote:
At 6/16/08 09:49 AM, Doomsday-One wrote: As tempted as I am to change the '&' to '&&', I shall resist the urge...
It should be an "or" operator anyway =)
That was EnglishScript. Not ActionScript.

EnglishScript != ActionScript

Damn. I don't know much EnglishScript.
Any tutorials you can link me to? =P


None

CaiWengi

Reply To Post Reply & Quote

Posted at: 6/16/08 11:18 AM

CaiWengi EVIL LEVEL 05

Sign-Up: 09/17/04

Posts: 1,003

ES:Main

O RLY? SRSLY? NO WAI? "chill out chiWengi!"

BBS Signature

Crying

regimag

Reply To Post Reply & Quote

Posted at: 6/16/08 03:11 PM

regimag LIGHT LEVEL 06

Sign-Up: 01/12/08

Posts: 42

Well... Your out of luck The one banana. Dosen't work...

HI! I'm 9 years old my sister is 6


None

The-One-Banana

Reply To Post Reply & Quote

Posted at: 6/16/08 06:45 PM

The-One-Banana NEUTRAL LEVEL 10

Sign-Up: 12/12/07

Posts: 33

At 6/16/08 03:11 PM, regimag wrote: Well... Your out of luck The one banana. Dosen't work...

I think it does. Where did you apply this code?


None

El-Presidente

Reply To Post Reply & Quote

Posted at: 6/16/08 06:54 PM

El-Presidente LIGHT LEVEL 23

Sign-Up: 06/02/05

Posts: 4,566

Damn some of you guys suck at coding. You REALLY have to fully explain exactly what it is that you're trying to do. Banana, your code doesn't work firstly because you added double equals marks trying to make something equal another. Two equal marks makes it so that you check if they're equal. And what the hell is if((obj1) hitTest (obj2)){, that's MoronScript 2.0. I have to go eat, but I'll write up some code when I get back.

Lawl, EnglishScript

MY E-PENIS IS BIGGER THAN YOURS
8=================================>
AS: Main || AS3: Main || CampNorth || FAB: Warning! Only for real men.

BBS Signature

Misunderstood

The-One-Banana

Reply To Post Reply & Quote

Posted at: 6/16/08 07:04 PM

The-One-Banana NEUTRAL LEVEL 10

Sign-Up: 12/12/07

Posts: 33

At 6/16/08 06:54 PM, El-Presidente wrote: Damn some of you guys suck at coding. You REALLY have to fully explain exactly what it is that you're trying to do. Banana, your code doesn't work firstly because you added double equals marks trying to make something equal another. Two equal marks makes it so that you check if they're equal. And what the hell is if((obj1) hitTest (obj2)){, that's MoronScript 2.0. I have to go eat, but I'll write up some code when I get back.
Lawl, EnglishScript

I apologize. I was in a rush and I wrote that in a minute or two. But you don't have to go around putting down people for making an honest attempt.


Winking

regimag

Reply To Post Reply & Quote

Posted at: 6/16/08 09:46 PM

regimag LIGHT LEVEL 06

Sign-Up: 01/12/08

Posts: 42

At 6/16/08 07:04 PM, The-One-Banana wrote: I apologize. I was in a rush and I wrote that in a minute or two. But you don't have to go around putting down people for making an honest attempt.

Ok, my flash player I'm using this code is Macromedia 8 with Actionscript 2.0. You should fix the code a bit or try another one so I'll come and try again.

HI! I'm 9 years old my sister is 6


None

WolfAkela

Reply To Post Reply & Quote

Posted at: 6/17/08 06:15 AM

WolfAkela LIGHT LEVEL 08

Sign-Up: 12/19/05

Posts: 1,926

You know what? The thing you should do is to go over the AS: Main tutorials and study coding yourself.

ALL codes given to DOES work, but because you're only copy pasting the code, it WON'T work. I'm all for helping newbies out, but you're just gonna feed him the code without letting him learn how it works, he'll forever rely on others for copy paste. It also doesn't help that you're starting to sound arrogant when you said "You should fix the code a bit or try another one so I'll come and try again.". It's like telling someone to do your work for you (well, it actually is).

I'll link you to the basics. Read it, understand it and master it. You will not make games without learning how to make them.

AS: Beginning ActionScript (extreme basics)
http://www.newgrounds.com/bbs/topic/3543 98

AS: Basic Collision Detection
http://www.newgrounds.com/bbs/topic/2967 55

AS: If-else conditionals
http://www.newgrounds.com/bbs/topic/2966 99

Those are basic things that every scripter knows. From those, you can do do what you want.

Hint -- what you want to do can be accomplished in 5 minutes or less. It's real basic.

Sleeping

regimag

Reply To Post Reply & Quote

Posted at: 6/17/08 08:07 AM

regimag LIGHT LEVEL 06

Sign-Up: 01/12/08

Posts: 42

....Alright

HI! I'm 9 years old my sister is 6


Questioning

Heidi564

Reply To Post Reply & Quote

Posted at: 6/17/08 08:14 AM

Heidi564 LIGHT LEVEL 03

Sign-Up: 01/25/08

Posts: 3

At 6/17/08 06:15 AM, WolfAkela wrote: You know what? The thing you should do is to go over the AS: Main tutorials and study coding yourself.

ALL codes given to DOES work, but because you're only copy pasting the code, it WON'T work. I'm all for helping newbies out, but you're just gonna feed him the code without letting him learn how it works, he'll forever rely on others for copy paste. It also doesn't help that you're starting to sound arrogant when you said "You should fix the code a bit or try another one so I'll come and try again.". It's like telling someone to do your work for you (well, it actually is).

Who do you think your talking to? I'm Regimag's sister. I don't have any problems on any stupid games because I started flash before she did.


None

TrillingBird

Reply To Post Reply & Quote

Posted at: 6/17/08 08:21 AM

TrillingBird LIGHT LEVEL 03

Sign-Up: 04/11/08

Posts: 291

her signature says shes 9 lol

well hey

go to

google and look up beat em up tutorial 6 or 7

one of this has a invincibility thing

you just have to replace the rick.mc with ur characters name or the enemy u want this to happen to


Shouting

CaiWengi

Reply To Post Reply & Quote

Posted at: 6/17/08 08:22 AM

CaiWengi EVIL LEVEL 05

Sign-Up: 09/17/04

Posts: 1,003

At 6/17/08 08:14 AM, Heidi564 wrote:
Who do you think your talking to? I'm Regimag's sister. I don't have any problems on any stupid games because I started flash before she did.

Holy sh!t! WolfAkela you better run this guys got his sister on you!

O RLY? SRSLY? NO WAI? "chill out chiWengi!"

BBS Signature

None

WolfAkela

Reply To Post Reply & Quote

Posted at: 6/17/08 08:45 AM

WolfAkela LIGHT LEVEL 08

Sign-Up: 12/19/05

Posts: 1,926

At 6/17/08 08:14 AM, Heidi564 wrote: Who do you think your talking to? I'm Regimag's sister. I don't have any problems on any stupid games because I started flash before she did.

E-threats. Oh boy, how it makes my toes shiver.

I'm only helping Regimag.

Shouting

regimag

Reply To Post Reply & Quote

Posted at: 6/21/08 08:02 AM

regimag LIGHT LEVEL 06

Sign-Up: 01/12/08

Posts: 42

More comments please!!!! The user who wrote a comment of a ideal of the beat em up tutorial, that dosen't work. Someone needs to find the best invisibillity to find. I really need that for my game.

HI! I'm 9 years old my sister is 6


All times are Eastern Daylight Time (GMT -4) | Current Time: 02:53 AM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
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!