Help! Actors appearing in the same place! Need tips on polishing this.
Hi guys, Im fairly new here but I come from a design/program background so I think logically, anyways im really tied up in a knot on a specific issue regarding my first game.
I have several actors which appear randomly (based on random numbers) (they have there own "ID" atribute) in 8 different positions of my screen (iPad). There are 4 categories of actors. (but lets proceed with just 2 for this example) Each with 8 actors. Let's call them blue and yellow.
The game starts with spawning the "blue" actors, after a certain amount of those, we move onto the "yellow" (without stoping the spawn of blue).
My problem is at certain points I get blue and yellow actors poping up at the same time.
I've tried different approaches to having this solved but all methods seem to fail. Including a rule detecting collision. This latter doesn't work because of how I've set the game up in the first place.
Please help me, if I can pay whoever for 20 minutes of your time via skype that would be amazing!
I have several actors which appear randomly (based on random numbers) (they have there own "ID" atribute) in 8 different positions of my screen (iPad). There are 4 categories of actors. (but lets proceed with just 2 for this example) Each with 8 actors. Let's call them blue and yellow.
The game starts with spawning the "blue" actors, after a certain amount of those, we move onto the "yellow" (without stoping the spawn of blue).
My problem is at certain points I get blue and yellow actors poping up at the same time.
I've tried different approaches to having this solved but all methods seem to fail. Including a rule detecting collision. This latter doesn't work because of how I've set the game up in the first place.
Please help me, if I can pay whoever for 20 minutes of your time via skype that would be amazing!
Best Answer
-
tatiang Posts: 11,949
It's a bandaid solution, but what about having a game.spawnTime (real) attribute and changing it to game.time each time an actor is spawned? And then in your spawner(s), have a rule that says When game.time does not equal game.spawnTime ... [spawn actor].
The other thought I had was to create timer "windows" for your spawners. I'm not sure if this would work for what you need, but it's a way to alternate spawning without conflicts:
http://dl.dropbox.com/u/19602014/timer windows.png
(all four timers are set to "Run to completion")
Basically, the blue actors "spawn" between 2.1-3.0 seconds (game.Time) while the yellow actors "spawn between 3.1-4.0 seconds (game.Time), and then the whole process starts over again two seconds later with blue spawning between 4.1-5.0 seconds and yellow spawning between 5.1-6.0 seconds.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
JohnPapiomitis
Since there are 8 different spawn locations, i've set a "if slot used" boolean and each animation has a rule that works "if slot used = false" - This is not working either.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User