Spawning actors randomly with some of them being rarer than other
Barking_Apps
Member Posts: 182
Hello all,
Having a little trouble, I haven't been using GameSalad in a while but have just recently got back into it and have forgotten some really basic stuff, here is what i am trying to do;
I have 3 actors actor 1, actor 2 and actor 3. I wish to spawn these actors randomly (which I can do easily) however I wish to make actor 1 spawn a lot every 3 seconds in fact. Actor 2 needs to be more rare than this so it spawns every 20 seconds (not exactly 20 seconds but around this) and actor 3 the same but being around 45 seconds ish.
Instead of doing timers I want them to spawn randomly but each one to be more rare than the other.
If this makes sense!! Again I haven't been on here in a while so this could be so basic and im just being an idiot.
-BA
Having a little trouble, I haven't been using GameSalad in a while but have just recently got back into it and have forgotten some really basic stuff, here is what i am trying to do;
I have 3 actors actor 1, actor 2 and actor 3. I wish to spawn these actors randomly (which I can do easily) however I wish to make actor 1 spawn a lot every 3 seconds in fact. Actor 2 needs to be more rare than this so it spawns every 20 seconds (not exactly 20 seconds but around this) and actor 3 the same but being around 45 seconds ish.
Instead of doing timers I want them to spawn randomly but each one to be more rare than the other.
If this makes sense!! Again I haven't been on here in a while so this could be so basic and im just being an idiot.
-BA
Comments
Spawn = Random (1,2)
If spawn = 1 spawn the actor
Will spawn and actor 1/2 of the time (approximately)
While
Spawn = Random (1,10)
If spawn = 1 spawn the actor
Will spawn and actor 1/10 of the time (approximately)
Hope that helps.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page