I'm trying to make a spawner that spawns random actors(i have 3) in the same position but not at the same time. any help?
Comments
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
Do you want the spawner to choose one of the three actors? Do you want the spawning to occur at some interval (e.g. every 4 seconds)? Do you want the spawned actor to always be in the exact same position? Or are you actually spawning three actors at once but each in a fixed position that never changes? And in that case, why not at the same time, and what do you mean by that?
i want the spawner to choose one of three the actors,i want the random actor to spawn every 2 seconds,i want them to spawn in the same position
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited January 2015
Timer every 2 seconds
.....Change attribute self.whichActor (integer) to random(1,3)
.....When attribute self.whichActor is 1
..........Spawn actor [actor1]
.....When attribute self.whichActor is 2
..........Spawn actor [actor2]
.....When attribute self.whichActor is 3
..........Spawn actor [actor3]
Comments
Do you want the spawner to choose one of the three actors? Do you want the spawning to occur at some interval (e.g. every 4 seconds)? Do you want the spawned actor to always be in the exact same position? Or are you actually spawning three actors at once but each in a fixed position that never changes? And in that case, why not at the same time, and what do you mean by that?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i want the spawner to choose one of three the actors,i want the random actor to spawn every 2 seconds,i want them to spawn in the same position
Timer every 2 seconds
.....Change attribute self.whichActor (integer) to random(1,3)
.....When attribute self.whichActor is 1
..........Spawn actor [actor1]
.....When attribute self.whichActor is 2
..........Spawn actor [actor2]
.....When attribute self.whichActor is 3
..........Spawn actor [actor3]
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thank you this works exactly like i wanted it