0 Favourites

building a menu

This forum is currently in read-only mode.
  • What would be an elegant/efficient way to do the following:

    In game, in a menu:

    Items can get upgraded.

    Click on the item to upgrade it.

    After clicked on the item, and it is upgraded, it is visually shown by a circle-sprite behind it.

    Example:

    <sword> X X X (not upgraded)

    <sword> O X X (upgraded once)

    <sword> O O X (upgraded twice)

    I was thinking about the following solution, but it is cumbersome, I think:

    +With every creation of the upgrade-menu:

    -> place X-sprites on the correct positions.

    -> give every X-sprite its own number, so that you know which number is which X-sprite.

    + Sword: Is global variable 'SwordUpgrade' Equal to 1

    + X-sprite: identify the first X-sprite (number 1)

    -> UpgradeStar: Set animation frame to Circle-sprite-frame.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I got this working, but I was just wondering if this was something common, where experienced (construct-)programmers had some advice for.

    This is not urgent.

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