How do I make 3 shots for a angry bird style game

0 favourites
  • 4 posts
From the Asset Store
A sound pack containing 132 laser gun sound effects, including mono and stereo versions of audio files.
  • i am using the basic demo that is with the C2 but im trying to figure out how to allow the player to have 3 shots instead of one. ive tried playing with variables but no good. please help

  • What have you set up that limits your player to having one shot?

    Everything that defines what one can or cannot do is a condition. You're on the right track with variables.

    For example, add a variable ShotsLeft=3

    Your condition for firing would include System compare variable - ShotsLeft>0.

    And your action for firing would include System subtract from - ShotsLeft.

    Or you can have an event for after firing, if shots left is more than 0, then reset/reload the next shot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks for the reply. here is my event sheet.

    its the basic physics catapult game in C2 but cant seem to make 3 shots

  • There is a communication issue here.

    What exactly do you mean by "make 3 shots" ?

    Do you mean you want the player to be limited to 3 attempts at shooting or do you mean for the player to shoot 3 projectiles at the same time ?

    As you stated this is the basic code from the example.

    That example does not contain any limitations about the number of shots the player can take.

    If you want to limit to 3 total shots, then simply add this limit yourself.

    Add a global variable "ShotsFired".

    In event "On touch end" Add 1 to ShotsFired.

    In Event "isAiming = 1" add a condition to check that ShotsFired is less than 3.

    This will limit your player shooting more than 3 times.

    This is because of how events work.

    The event sheet is read from top to bottom, the conditions for each event are checked, and if they are true the actions are executed.

    If any condition of the event is false the actions are not executed and the sub events for this event are ignored as well.

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