maplealvon
06-24-2009, 10:03 AM
I'm a newbie at using actionscript and I'm trying to make a game where the player has to press the space bar repeatedly to win against the pc.
My idea is to have to random numbers, one belonging to the player and the other belonging to the computer.
If the player's random number is larger compared to the computer's the player wins and moves on; if the computer's random number is smaller or equal to the player's, the player loses and the game ends.
So how do I make the script so that the by repeatedly pressing the space button, the player can increase his/her chance of getting a higher random number and thus winning.
My idea is to have to random numbers, one belonging to the player and the other belonging to the computer.
If the player's random number is larger compared to the computer's the player wins and moves on; if the computer's random number is smaller or equal to the player's, the player loses and the game ends.
So how do I make the script so that the by repeatedly pressing the space button, the player can increase his/her chance of getting a higher random number and thus winning.