Am I doing something wrong?

0 favourites
  • 7 posts
From the Asset Store
Be quick and choose whether the shown equation is right or wrong.
  • I wanted to set up a certain timer for a specific 'SmallFern' that was already eaten, or in other terms, it's Capacity = 0. Capacity 0 meant you could not eat it anymore and it went invisible by switching to a frame in the 'animation' that had no sprite. Upon Capacity turning 0 I wanted it to start a 'Regrowth' timer set to once, which, once the time was reached that specific instance of 'SmallFern' were to change it's frame in the animation to fully-grown and it's Capacity to 3. Each time you eat the plant while it is atleast 1 or greater then 1 capacity it would fill some hunger and subtract one capacity, therefore changing the frame of the animation to a more eaten look.

    The problem is that the timer never starts, when using Debug testing the timer does start, but stays at the number 0 and never goes up, therefore the plant never regrows.

    Here is a screenshot of the events.

    Thank you for your help.

  • You need to make all of your Capacity checks under a sub-event of the Collision. Right now, only Capacity>= 1 is checked on the collision. The rest are checked constantly, which is resetting your timer constantly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to make all of your Capacity checks under a sub-event of the Collision. Right now, only Capacity>= 1 is checked on the collision. The rest are checked constantly, which is resetting your timer constantly.

    I don't quite understand what you mean. Could you elaborate please?

  • Extrapolate from here:

  • It does not work at all. It simply instantly sets all ferns to animation frame 3, which makes it invisible to see (which is what animation frame 3 is for.) I don't see how this has any difference at all to be honest, it has the same effect as labeling each amount of capacity as a different frame while breaking it completely.

  • It does not work at all. It simply instantly sets all ferns to animation frame 3, which makes it invisible to see (which is what animation frame 3 is for.) I don't see how this has any difference at all to be honest, it has the same effect as labeling each amount of capacity as a different frame while breaking it completely.

    Alright, I noticed a problem and moved the On collision with small fern and it's actions into a sub event, but it didnt change anything. I can still eat the ferns while they are invisible which is what i wasnt able to do before, but i dont want them to be able to be eaten while invisible. Although if I do manage to accidentily eat one, then it automatically skips to 1 capacity, therefore skipping 1 whole capacity number and animation frame. It doesn't even regenerate after fully eaten either.

    My problem is only the damn timer, the timer starts, but stays at 0 and seems like it's resetting and none of these 'fixes' you have said make any sense to me or work in the slightest.

  • Sorry for the Triple post, but I fixed it myself.

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