Am I doing something wrong?

Get help using Construct 2

Post » Thu Mar 31, 2016 10:37 pm

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. Image

Thank you for your help.
B
28
S
11
G
4
Posts: 77
Reputation: 4,321

Post » Thu Mar 31, 2016 11:06 pm

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.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Fri Apr 01, 2016 2:05 am

blackhornet wrote: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?
B
28
S
11
G
4
Posts: 77
Reputation: 4,321

Post » Fri Apr 01, 2016 3:18 am

Extrapolate from here:
Image
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Fri Apr 01, 2016 6:02 am

Image

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. :|
B
28
S
11
G
4
Posts: 77
Reputation: 4,321

Post » Fri Apr 01, 2016 6:06 am

PrimalNews wrote:Image

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.
B
28
S
11
G
4
Posts: 77
Reputation: 4,321

Post » Fri Apr 01, 2016 6:23 am

Sorry for the Triple post, but I fixed it myself. Image
B
28
S
11
G
4
Posts: 77
Reputation: 4,321


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 25 guests