00:00
00:00
Newgrounds Background Image Theme

GodsPurpose just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Help With Minigame

870 Views | 16 Replies
New Topic Respond to this Topic

Help With Minigame 2009-07-15 19:41:49


I have a game where a Head Moves Around. You Get 10 points everytime you poke its eyes.
I have A motion tweening of the movie clip... You know what. Hang on.

I Cannot Put the score in the In the Movie clip With the eye Buttons because it is moving,
And I dont want the Score to move. How do i get it to stay put?

The reason i have to put the score there is because It wont work If the score and the Buttons that add the score are in two seperate movie clips!! Is there any way to fix this?

Answering either of those questions will help.


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 19:44:00


Show some code.


BBS Signature

Response to Help With Minigame 2009-07-15 19:47:40


At 7/15/09 07:44 PM, Neo-13 wrote: Show some code.

Hello Again Neo.

I AM NOT GOOD WITH CODE.
Sooo.Give me an example of how the score variable could Be outside of the mc


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 19:50:34


At 7/15/09 07:47 PM, Capconami wrote:
At 7/15/09 07:44 PM, Neo-13 wrote: Show some code.
Hello Again Neo.

I AM NOT GOOD WITH CODE.
Sooo.Give me an example of how the score variable could Be outside of the mc

You're talking about it moving around, so I'm asking for your code so I can see how you're moving it.

Variables aren't stored in MCs. You can display a variable in a text box which can be in an MC, but you could just make a text box and put it in the corner, call it scoreBox, then add this code to the main timeline:

scoreBox.text = yourScoreVariable;

BBS Signature

Response to Help With Minigame 2009-07-15 19:57:04


I FIGURED IT OUT

Now can someone tell me how to make some thing happen when a Variable is reached?


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 20:01:25


At 7/15/09 07:57 PM, Capconami wrote: I FIGURED IT OUT

Now can someone tell me how to make some thing happen when a Variable is reached?

I assume by 'reached' you mean that it's got to a certain value.

if (variable == something)
{
    //do stuff
}

BBS Signature

Response to Help With Minigame 2009-07-15 20:08:47


Sorry. Im a total as newb


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 22:38:10


At 7/15/09 08:08 PM, Capconami wrote: Sorry. Im a total as newb

Alright

Score = "0";

if (Score = 10) {
gotoAndPlay("Scene 5", 7);
}

But it sets the score to 10! Suggestions


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 23:00:42


At 7/15/09 10:38 PM, Capconami wrote:
At 7/15/09 08:08 PM, Capconami wrote: Sorry. Im a total as newb
Alright

Score = "0";

if (Score = 10) {
gotoAndPlay("Scene 5", 7);
}

But it sets the score to 10! Suggestions

Read the stuff people give you carefully. He had a double == which is a conditional operator rather than an assignment operator, score = 10 being score should now equal 10. Also dont do score = "0", if your score is going to be a number all the time, then dont put quotes. " "s are for Strings (used for like names and such other things )

Response to Help With Minigame 2009-07-15 23:11:25


Ok Let me try that...


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-15 23:13:41


At 7/15/09 11:11 PM, Capconami wrote: Ok Let me try that...

No...It still goes to "Secret 1" Right Away


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-16 01:33:46


At 7/15/09 11:13 PM, Capconami wrote:
At 7/15/09 11:11 PM, Capconami wrote: Ok Let me try that...
No...It still goes to "Secret 1" Right Away

Well, you set score to equal "0" with quotes... Try removing the quotes on the 0.


Ye

Response to Help With Minigame 2009-07-16 01:35:59


At 7/16/09 01:33 AM, UberCream wrote:
At 7/15/09 11:13 PM, Capconami wrote:
At 7/15/09 11:11 PM, Capconami wrote: Ok Let me try that...
No...It still goes to "Secret 1" Right Away
Well, you set score to equal "0" with quotes... Try removing the quotes on the 0.

OH no wait, scratch that. The score went to 0 because you can't carry variables to another scene (I think). Change the frame that the movie goes to when the condition is reached to a frame in the same scene.


Ye

Response to Help With Minigame 2009-07-16 14:44:42


Now How Do I make it Generate A random object?


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-16 17:23:11


At 7/16/09 02:44 PM, Capconami wrote: Now How Do I make it Generate A random object?

Be more specific. What sort of object? From the library or drawing API?


BBS Signature

Response to Help With Minigame 2009-07-16 19:59:51


At 7/16/09 05:23 PM, Neo-13 wrote:
At 7/16/09 02:44 PM, Capconami wrote: Now How Do I make it Generate A random object?
Be more specific. What sort of object? From the library or drawing API?

A Button From the library


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Response to Help With Minigame 2009-07-16 20:12:45


At 7/16/09 07:59 PM, Capconami wrote:
At 7/16/09 05:23 PM, Neo-13 wrote:
At 7/16/09 02:44 PM, Capconami wrote: Now How Do I make it Generate A random object?
Be more specific. What sort of object? From the library or drawing API?
A Button From the library

Look up Math.random() and attachMovie() in the Flash help files (F1).


BBS Signature