Random Squares

cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
edited November -1 in Working with GS (Mac)
Hi guys,

I'm trying to work out how to code something and am wondering if any of you can help.

The little game will basically have 8 squares, 6 of the squares are white and 2 are red, they appear on the screen for a couple of seconds and then turn white, you basically have to remember where they are.

I know how to do some of the programming, but i'm not sure how to random the position of the 2 red squares.

Can anyone shed any light on this for me?

Many thanks in advance for your help.

Chris

Comments

  • GaranasGaranas Member Posts: 86
    make a game attribute "redcount" and in the red actor a "change attribute" redcount+1

    now a rule that only spawns red if the red count is equal or below 2

    for the rest you have to tinker around a bit.
  • cnmeyer1980cnmeyer1980 Member, PRO Posts: 211
    Hi Garanas,

    Thank you for the advise above, much appreciated.

    Cheers,

    Chris
Sign In or Register to comment.