You are viewing our Forum Archives. To view or take place in current topics click here.
Anyone with experience in Flash?
Posted:

Anyone with experience in Flash?Posted:

Bazuel
  • Challenger
Status: Offline
Joined: Jan 27, 201014Year Member
Posts: 173
Reputation Power: 6
Status: Offline
Joined: Jan 27, 201014Year Member
Posts: 173
Reputation Power: 6
I am currently taking Game Design I at my school and have gotten most of my first level finished. Everything is working the way I want it to, but I can't figure out how to make the player win the level basically.

To win the first level the player has to navigate through a maze and collect "food". I have a scoreboard and when all the food is collected the total score will be 25. When the score reaches 25 I want it to either automatically go to a win screen or have a button appear. I don't know how to do either of these.

We are using Action Script 2, which is a pain to use. Anything helpful would be much appreciated!

So can anyone help me out?
#2. Posted:
Valzo
  • TTG Natural
Status: Offline
Joined: Oct 23, 201013Year Member
Posts: 948
Reputation Power: 39
Status: Offline
Joined: Oct 23, 201013Year Member
Posts: 948
Reputation Power: 39
I dont know flash at all In c++ it would be something like this if it helps?
if playervariable=25
 win ( );
if playerfruit=25
(

<<cout "You have won or whatever you want it to show?"<<

)
#3. Posted:
Bazuel
  • Challenger
Status: Offline
Joined: Jan 27, 201014Year Member
Posts: 173
Reputation Power: 6
Status: Offline
Joined: Jan 27, 201014Year Member
Posts: 173
Reputation Power: 6
That looks similar, but Flash loves to make everything difficult. Just for the player to move was annoying for me to get working.

The code for all of the score related stuff is...

var score = 0;
Scoreboard.text = score;

if ( bunny.hitTest(Blueberry)) {
Blueberry._x = 600;
Blueberry._y = 50;
score += 5;
Scoreboard.text = score;
}


So really this makes it harder then what it needs to be. I think I have an idea of what to do but not sure of how to go about it. I have "guards" moving in the maze and if you hit one of them it takes you to a loose screen, I can do that much. If I could figure out how to make it do the game when the score equals 25 I would be in good shape.

The code for the guard is...

if ( bunny.hitTest(Guard)) {
gotoAndPlay (10);
}


This making any sense to you?
#4. Posted:
Karate_Cat
  • Prospect
Status: Offline
Joined: Aug 14, 201013Year Member
Posts: 631
Reputation Power: 27
Status: Offline
Joined: Aug 14, 201013Year Member
Posts: 631
Reputation Power: 27
Wouldnt it just be
if (_root.score = 25){
_root.gotoAndPlay ("level2")
}

?
I tried to make an example for you, but my flash kept crashing, and i remembered, i havent figured score out properly in my own game yet
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.