S
SlothSam
Guest
Okay so, my intent is this: At the start of the game, 1-5 Objects (monsters, its a monster game) spawn randomly out of a set of 50 (right now only 2 test objects though). ((it also might be helpful to know that its a set of 50 for day and another set of 50 for night, running hopefully in real time?))
After 30 minutes, all instances of these objects are to destroyed and another set of 1-5 random objects spawned.
I've got a looping timeline to destroy the instances and pick 1 of 5 alarms (to determine if its 1, 2, 3, 4, or 5 monsters that spawn)
What I can't sleuth out is how to best get it so it does actually spawn more than 1 random monster for 4 of the alarms.
I would also like to know if the code I'm using is like, what I should be doing for this? I was looking around online for some time to find any tutorials to spawn a random object from a set and not just spawn a set object in a random location, and I think this might be what I'm looking for? I am in no way familiar with code so help and critique is greatly appreciated (im using version 1.4.1804 if that is of help)
After 30 minutes, all instances of these objects are to destroyed and another set of 1-5 random objects spawned.
I've got a looping timeline to destroy the instances and pick 1 of 5 alarms (to determine if its 1, 2, 3, 4, or 5 monsters that spawn)
What I can't sleuth out is how to best get it so it does actually spawn more than 1 random monster for 4 of the alarms.
I would also like to know if the code I'm using is like, what I should be doing for this? I was looking around online for some time to find any tutorials to spawn a random object from a set and not just spawn a set object in a random location, and I think this might be what I'm looking for? I am in no way familiar with code so help and critique is greatly appreciated (im using version 1.4.1804 if that is of help)
Code:
if current_hour >= 6 and current_hour < 18
then monster = choose(nighttest1_obj, nighttest2_obj)
else
monster = choose(Unicorn_obj, daytest1_obj, daytest2_obj)
if (spawn) {
instance_create(random(1024),random(768),monster);
alarm[0] = 53999;
spawn = false; }