Having a hard time figuring this out...
So what I'm trying to accomplish is basically have an actor that is 100 height and 10 width (a rectangle that touches the ceiling and the floor) and I want there to be multiple colors on that rectangle. The rectangle accelerates towards the left half of the screen then disappears, and another rectangle spawns (same as the first), but the colors are different/in different order.
This part is easy, the next part is what I can't figure out.
I want to GameSalad to randomly generate the colors, but also know which colors are on there, so when the main actor collides with the color (and the main actor is the same color), it registers.
Let's say it's almost like brick breaker, but sideways, and the bricks are coming at you and the ball can only move up and down. And every time the bricks become close to the ball (think of space invaders but sideways), another 'set' of bricks spawns at the beginning and are a random set of colors (but GS knows which colors are present)
If I didn't explain this well enough, let me know.
Comments
If you have a relatively small number of possible color combinations, you could create them all in a graphic design program and then name them with unique names. In Creator, you could then check the name of the actor to see which color combination was spawned.
Another way to do this is to have three separate actors that each choose a random color value and then change a game attribute or table cell value to that chosen value. When the main character collides, it will check the game attribute or table cell and react accordingly.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
When you say relatively small, is 6 or 7 colors a relatively small amount? Or are you talking like 2 to 3?
Also, regarding the first part, how would you check the name of a spawned actor? Is there any way to "see" which actors are on the screen or have been spawned?
Sorry for not understanding, I'm semi-new to gamesalad and game creation in general.