Random Spawners
gregfaulks
Member Posts: 21
Hey guys, I have a problem and the solution may be very simple but I just can't understand what's going on.. Ok so I have 3 separate random spawner's in my scene. This screenshot shows the rules I have used for each of my spawner's... However the problem I have is that all of these spawner's are spawning actors at exactly the same time despite them for one being completely different spawning actors and two that they each have their own random function within their own timers.
Any advice / solution would be much appreciated. Thanks
Comments
An Every Timer takes a single value and runs that timer continuously at that value. So if you use a random expression, it won't reset the value each time it runs. You need a custom interval timer and I have just the thing for you: http://forums.gamesalad.com/discussion/comment/464547/#Comment_464547
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Brilliant!! Thanks @tatiang for your help!! I should of known this.
hey @tatiang I am unable to open your file as I'm using the windows version of gamesalad. However I managed to put this together and everything works fine when I preview it in gamesalad, but when I try and test the game using testflight nothing seems to spawn at all. Am I still making the same error using an every timer?
Your setup looks fine. It should choose a random number from 1 to 12 every 0.7 seconds and then spawn an actor if the value of that random number is 1, 2, or 9 AND it hasn't repeated a value (i.e. 1, 1, 1, 2, 2, 9 would only spawn three actors because the rule condition doesn't change when values repeat).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User