Randomness in timelines

M

Mapped

Guest
So I've been making some kind of randomized-Bullet-Hell type of game, and not too complex of course since it is my first time using code and GameMaker.
I'm using a timeline to create all of the bullets and the instances, which work well, except for one detail: No many times how I restart my game, the randomness of numbers does not change.
For example here, I used a code event to say spawn three warnings (which are going to transform into fireballs using the object):
Code:
instance_create(128+random(768),192+random(448),obj_fireball_warning);
instance_create(128+random(768),192+random(448),obj_fireball_warning);
instance_create(128+random(768),192+random(448),obj_fireball_warning);
The problem is, they always spawn at the SAME EXACT PLACE. Same thing for very other instances. Is there any way I can fix this simply? Like without having to rewrite all of my code?
 
B

BubbleMage123

Guest
Straight from Game maker:
NOTE: This function will return the same value every time the game is run afresh due to the fact that GameMaker: Studio generates the same initial random seed every time to make debugging code a far easier task. To avoid this behaviour use randomize at the start of your game.
 
Top