Kk, well I'm designing a balloon shooting game.
The premise of the game is simple
4 balloons
Mouse is crosshairs
Balloons will come up random times
As time gets higher faster balloons get
I can do all but one and its he
Balloons will come up random times, I am unsure how to set this up. I have the four balloons as MC.
How do i duplicate those and make them come up at random times
Objects appearing
Started by travmanx, Apr 03 2006 06:20 PM
2 replies to this topic
#1
Posted 03 April 2006 - 06:20 PM
#2
Posted 04 April 2006 - 02:15 PM
My logical way of thinking a solution for that would be like:
1. Create a function which "releases" the balloon(s)
2. create a setInterval with a Math.random statement in it
3. If statement checking the "playtime" so you can speed up the balloon release, setting the interval from new.
1. Create a function which "releases" the balloon(s)
2. create a setInterval with a Math.random statement in it
3. If statement checking the "playtime" so you can speed up the balloon release, setting the interval from new.
#3
Posted 04 April 2006 - 11:53 PM
To make sure you release 4 different types of balloons, make sure you name your balloons something like this:
mcBalloon1
mcBalloon2
mcBalloon3
That way, when you use actionscript to call them out, you can do this:
attachMovie("mcBalloon"+random(4),"balloon"+i+"_mc",depth)
mcBalloon1
mcBalloon2
mcBalloon3
That way, when you use actionscript to call them out, you can do this:
attachMovie("mcBalloon"+random(4),"balloon"+i+"_mc",depth)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
