How do I block out a second player?

0 favourites
  • 7 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hi everyone!

    I'm working on a quiz show game that uses buzzers. I'm trying to set my game up so when I press "s" an image and sound appears that indicates player 1 has buzzed in and when a player hits letter "k" a different image and sound appears for player two.

    This part is no problem. I just had the system spawn the image on keypress.

    What I am having trouble with is making it so that when player 1 hits "s" player two is locked out from hitting "k"

    I currently have it setup where an instance variable is set for each buzzer and defaults to true. After an opposing buzzer is pressed I have it set the value to false.

    When I do this and add another condition that checks the instance variable both buzzers stop working?

    I oploaded the capx at the link below if anyone can help!

    twincade.com/GameShow.capx

    Thanks!

  • It's because you're using conditions for objects that haven't been created yet. I would use a global variable to block the players from buzzing.

    https://dl.dropboxusercontent.com/u/495 ... wedit.capx

  • aww yea! Thanks!

  • Hi!

    I'm having a bit of trouble getting construct 2 to meet conditions.

    I set the quiz show setup to where if player 1 is unable to answer a question the host can press "H" and control is relinquished to player 2 so that they can have a chance to answer. This also should work in reverse, when player 2 is unable to answer and the host hits "H" control should be given to player 1.

    I set this up using global variables.

    For some reason it works for player 2 but not for player 1.

    Can anyone look and see what i'm doing wrong <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" />PPP

    twincade.com/GameShow2.capx

  • You've gotta be careful with the way that Construct 2 reads events from top to bottom. Event 8 sets Buzzer2 to 1, which makes event 9 true and runs event 9 making the game look the same as it was before. My standard is to add a short timer wait, even 0.1 secs before you set the new Buzzer1 and Buzzer2 variables, after the create object action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried to add wait commands nearly everywhere and no luck

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