Be a Supporter!

Help With Minigame

  • 607 Views
  • 16 Replies
New Topic Respond to this Topic
Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Help With Minigame 2009-07-15 19:41:49 Reply

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

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Help With Minigame 2009-07-15 19:44:00 Reply

Show some code.


BBS Signature
Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 19:47:40 Reply

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

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Help With Minigame 2009-07-15 19:50:34 Reply

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
Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 19:57:04 Reply

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

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Help With Minigame 2009-07-15 20:01:25 Reply

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
Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 20:08:47 Reply

Sorry. Im a total as newb


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 22:38:10 Reply

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

Coolio-Niato
Coolio-Niato
  • Member since: Jun. 30, 2005
  • Offline.
Forum Stats
Member
Level 28
Blank Slate
Response to Help With Minigame 2009-07-15 23:00:42 Reply

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 )

Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 23:11:25 Reply

Ok Let me try that...


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-15 23:13:41 Reply

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

UberCream
UberCream
  • Member since: Nov. 19, 2005
  • Offline.
Forum Stats
Member
Level 20
Animator
Response to Help With Minigame 2009-07-16 01:33:46 Reply

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.


"I'm in love with UberCream." - Max Gilardi.

UberCream
UberCream
  • Member since: Nov. 19, 2005
  • Offline.
Forum Stats
Member
Level 20
Animator
Response to Help With Minigame 2009-07-16 01:35:59 Reply

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.


"I'm in love with UberCream." - Max Gilardi.

Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-16 14:44:42 Reply

Now How Do I make it Generate A random object?


THE CAPCONAMI HAS COMPLETELY POSSESSED ME

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Help With Minigame 2009-07-16 17:23:11 Reply

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
Capconami
Capconami
  • Member since: Nov. 15, 2008
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to Help With Minigame 2009-07-16 19:59:51 Reply

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

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to Help With Minigame 2009-07-16 20:12:45 Reply

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