Power Bar question

This forum is currently in read-only mode.
From the Asset Store
Sheeky's Power-ups Sounds
$4.20 USD
30% off
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • Hi all

    I'm trying to make a speed launch bar which goes between min 700 to max 1300 values continuously until player press x. When player press players object gets that value.(Player tries to press it when it's near to max value)

    My question is how can I make a gui effect? Like a bar which should have maximum width when value reaches to 1300. And should have 1 width when value becomes 700. Should have half width when value is 1000 . Like that.

    I know it should be very simple math. But believe me, I'm very bad at math , especially time to time I forgot even simple math.

    Thank you very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi again

    I think I did it :) haha just a minute after I posted topic.

    I think It should be like (currentvalue-minvalue)/(maxvalue-minvalue)*bar's total width

    Thank you again :)

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