Flash Help needed.please

  • van_doodle
  • Newbie
  • Newbie
  • van_doodle
  • Posts: 9

Post 3+ Months Ago

Hello,

i've created a football shooter game. The user is the goal keeper and has to stop any footballs going into the goal. If the keeper lets more than two footballs in the whole game(which is in its own separate scene) starts again.
I have already got


Code: [ Select ]
trace(_global.goal);
_global.goal = 0;
  1. trace(_global.goal);
  2. _global.goal = 0;


which is tracing the keeper


Code: [ Select ]
_global.goal ++;
trace(_global.goal);
  1. _global.goal ++;
  2. trace(_global.goal);


which is on every ball

What sort of code do i need to make this work?

Help me

Thank you
Flash fan who is freaking out! :shock:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dhonsvick
  • Beginner
  • Beginner
  • dhonsvick
  • Posts: 49

Post 3+ Months Ago

First things first...get the code off of the balls
Create an actions layer in the first frame of the movie.


a good first approach would be to write the flow of the game in english first


all code lives in actions field in the _root level

ball flies

if blocked mylabel.text = "good work"
my_counter add 1 to good counter
check to see if game is won
if gameover
send out the dancing girls

Zero out the variables so game can start over

else

add one to bad counter
check to see if game is over
if gameover
send to hall of shame

Zero out the variables so game can start over


end

now with what ever you are using to block the ball you will be checking for a collision between your cursor and the ball

I would imagine that you would limit the blocker to move ment on the _x axis only or limited _y axis, another thought would be you probably want the balls going to random areas. I would also assume you are planning to animate the balls and the blocker with AS. To do this I would suggest using the Fusekit Framework. http://www.mosesSupposes.com.

You shouldnt have to draw many animations by hand. if so they should be encapsulated in thier own movie clips.

you could potentialy create this game in just a few code blocks.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.