4 different random objects with no duplicates

0 favourites
  • 3 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I'm looking to have 4 different objects (in this case it would be 4 different colours)spawn at 4 set points on the screen (the four corners). Every X seconds though the colours in the corner would randomly change.

    An example:

    Corner 1: blue

    corner 2: Green

    Corner 3: Red

    Corner 4: Yellow

    ------------------ 2 seconds come up

    Corner 1: Green

    corner 2: Blue

    Corner 3: Red

    Corner 4: Yellow

    The problem i'm having is I keep getting duplicates of the same object. I've tried various different methods of trying to only have only colour up at a time, have messed around with using different animation frames as opposed to objects, but still not having much luck.

    I'm pretty sure I'd need to use animation, as I'd want to anchor these four points to the screen to avoid any bugs with different screen sizes

    Thanks for reading :)

  • Here's one way: randomColors.capx (r113)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is exactly what I was looking for, thank you soo much :). Will put you in the credits and once again big thank you :) :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)