How do I make it so my character only spawns one shield?

0 favourites
  • 2 posts
From the Asset Store
Shield FX
$6.30 USD
30% off
Versatile shieldpack, usefull for protecting ships or buildings, area-forcefields, creating shockwaves ...
  • Hi all, I am very new to construct 3 and can not figure this out. My character (once space bar is pressed) is meant to spawn a shield, but I've found that if the space bar is pressed multiple times, multiple shields are spawned. I do not want this to happen and can't figure out how to stop this, I am using the free version of Construct 3 and would like any and all advice for this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a global variable for example lets call it hasShield, then your spacebar event should be 'on spacebar pressed' with condition hasShield=0. Then on the actions you spawn the shield and set hasShield to 1. This means it will only work one time because the variable changes to 1 and locks out the condition for 0. Then later on in the game when you are allowed to spawn a shield again you set the variable to 0.

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