Random Actor Help

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'd like to create a bubble breaker type game. My issue right now is creating an actor that displays the next ball that the cannon will shoot.

I'm struggling with the concept of using attributes for this process or if there is another way. Also, there is an issue of how do you start the level with a randomly generated ball that will be shot first?

I guess I'd use a scene/game attribute to generate a random number and correspond that number to the colored ball? Is there a good way of generating a random attribute number once a scene is started?

Any advice will be greatly appreciated. Thank you.

Comments

  • OkyshoOkysho Member Posts: 158
    T-shirt has the right idea. (obviously, he's Tshirtbooth) I used this for some of the enemy AI in my game.
    Using an integer attribute is a good alternative to Arrays, which haven't been introduced yet
  • DrGlickertDrGlickert Member Posts: 1,135
    This was helpful, but I already had most of what TShitBooth said. I'm still spawning multiple balls. Sometimes my cannon shoots a red and a blue ball at the same time...
    This is getting frustrating.
Sign In or Register to comment.