How do I set power of bullet on release of power button

0 favourites
  • 4 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • Hi,

    I hope someone can help, I have a power button, when I hold it down the power bar moves up to 100 (like on a golf game, the longer you hold the button down the more power you see the bar go up)

    But I'm trying to fire a bullet only when the power button is released (using touch), matching the power at the point the button was released.

    I hope this makes sense.

    Thank you for your time.

  • You need to link your bullet speed value to your bluepowerbar.Height or to the power variable but thats an extra action which may not be needed

    of course you can make it variable by adding a 'scale factor' according to the Height distance moved...

    so what I mean is....1 x 2 x 3 x 4 x power scaling....etc etc

    it could be ramped how ever you like ..easy gentle ramps or steadily increasing ..or power ramping

    its up to you

    does that make sense to you?

  • Change it to Is Touching >>> ADD 1 to power

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks guys,

    I've done it, I needed to add disable and enable bullet to stop it from going until I've pressed and released the button.

    Here is the code in case someone else one day needs it.

    Thanks

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