0 Favourites

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

  • 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.

  • thanks for the reply. here is my event sheet.

    https://postimg.org/image/r03p1712f/

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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread sticky
763 305,649
asikanddestroy's avatar
asikanddestroy
Unread hot topic
232 177,673
Tetriser's avatar
Tetriser
Unread hot topic
167 14,492
DMT2005's avatar
DMT2005