How can I make a go/no go game?

0 favourites
  • 2 posts
From the Asset Store
five golem elements Sprites Sheet.Best for enemy or villain game characters.
  • Hello guys,

    I need help creating a go / no go game.

    The layout is simple and the challenge is that the player must press a key whenever the red frame appears on the screen (for example), if he presses the key when a blue square appears, he is penalized.

    How can I do this?

    I have doubts about how to make the sprite "keep popping" on the screen, I don't know what is the best way to do that.

    Furthermore, I also have no idea how I can measure the player's response time when he presses the bar.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a red box frame and a blue box frame. Set the speed to 0 so it will only stay on Frame 0 and doesn’t automatically go to Frame 1, unless you change speed.

    Go to Event sheet. Add an Event-Select Box sprite you just created. Add another Condition: Select Compare Frame = 0 (0 was the blue frame) Add an action: Select (Wait x (at the bottom) Set it for 2 seconds)

    Add a 2nd action: Select Box - Select Change Frame to 1.

    Add another event. Copy what you did in first event, but change the 2nd part of condition to Compare Frame = 1 and in the Add Action change wait time to 4 and Change Frame back to 0.

    (Now instead of coding all this, you could go back to Animations Editor by clicking on your box. Duplicate Blue and Red frames multiple times. You can put in any order like 2 blues first then on Frame 3 make it Red. Set speed to 1 (if too slow, then change speed)

    Add an Event: Select Your player (or weapon what ever you use to touch boxes) Select On collision with another object-Select Box. Add a Sub-Event: Select Box-Select Compare Frame = 0 (under animations section) Add action: Select Player - Select subtract from Health(if this case, you will need to create a health system).

    Add another Sub-Event of the Condition (not the first sub-event you created).

    Repeat previous SubEvent except change Compare Frame to 1. Add Action: Destroy Box or whatever you planned it to do.

    NOTE: if you have more than one frame then in the 2 sub-events you will have to Make and Or block and add another condition and repeat Compare Frame and repeat it for each frame number Red is on. Go back up and do the same for Blue.

    Hope that helps.

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