How do I reduce an objects height permanently?

0 favourites
  • 3 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hi all,

    Currently I have a function that, when triggered, is supposed to reduce the height of a stamina bar. The problem is that after the function runs, it returns to its previous height.

    The way I have this set up is that the bar has an instance variable "stamina" that gets reduced by X amount and then it sets the height of the bar based on this variable. But, again, the height always resets after the function runs even though the variable number has been reduced.

    I can make it work by using the "every tick" action but I feel like that action takes an unnecessary amount of memory just to track stamina.

    What am I doing wrong here?

    (Thanks in advance for all your help)

  • The instance variable shouldn't change unless you set it to another value, are you setting it back to its default value somewhere and if so why ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lionz the instance variable does stay correctly but the action that sets the height of the meter based on the instance variable always resets the height.

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