PDA

View Full Version : how to do random


anguslvr
12-08-2008, 04:59 PM
i have a very basic game (my first) in mind about your a fish and your only able to go up and down (through 5 lanes) and there are sharks coming at you in all lanes but how do you create the randomness of the sharks.

also how do you make it get harder as time goes on

also how do you get a timer in there

this is a little compicated but stick with me

thanks in advance for helping me

EmosaurusRex
12-10-2008, 08:31 AM
Try creating three variables - one for frequency, one for lane, and one for the amount of sharks.
Set the value of lane to "random number" under world functions.
Frequency should start as a higher number and then get decremented over time (after x number of sharks). Once the frequency gets too low and you want to make it harder than that you can have it add multiple sharks at a time - just make sure that they don't end up in the same lane though.