How do I Make a weapon comparison bars?

0 favourites
  • 2 posts
From the Asset Store
Screen Comparison
$1.60 USD
60% off
See how your Logical Resolution looks on different devices
  • I know how to make a bars with the values etc, but I'm not sure how to approach this.

    Having the green when the compared value is greater and red when the compared value is less then.

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could make 3 bars for each statistic... one white (for the current weapon) and one red and one green.

    You would then need to store the stats for the weapon you're comparing with in a set of variables (global or local would probably do) then do some comparisons.

    The white bar would always be shown on top, with the red or green being underneath - visibility of each bar based on the comparisons;

    Example pseudo code:

    Compare -> WeaponVariable.RateofFire is less than Weapon2Variable.RateofFire -> GreenBar = invisisble, RedBar = visible

    Every tick -> Set WhiteBar.value to WeaponVariable.RateofFire

    Every tick -> Set RedBar.Value to Weapon2Variable.RateofFire

    There's always a million ways to do stuff, but this should work

    ~Sol

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