Boolean Operation problem and Layer Effect problem

Get help using Construct 2

Post » Thu Feb 02, 2012 4:01 am

Health Recharge problem
I created a code where if the player is taking damage the health is reduced. Once the player has stop taking damage the health will wait 4 second and then recharge. I set this up with a Boolean operation which seems to work, however if the player takes damage while the health is recharging the health continues to recharge. If I set the Boolean back to false it doesn't recharge/it counts 3 point and stops???

The 3 also comes in later if the health reach 100 it should stop counting however it will go for an extra 3 health points/seconds? (the 3 will change if every 1 second is changed to like 0.005 seconds)

I am thinking it has to do with wait 4 seconds (the system counts while it waits)

I did set a statement that forces the health to stay at maxHealth (100)

My layer effect problem.
At 25% health I want a layer 2 to fade in. It works fine however it is suppose to have an additive on the layer. If the health goes below 0 then the layer additive effect can be seen, just during the fade in it doesn't work. I am trying to avoid using a full size/screen transparent png (the file size would be bigger then I like).

This is my first attempt at coding in Construct so there might be a better way of doing it, that I am not seeing/don't know about.

http://dl.dropbox.com/u/5773521/recharge_health_q2.capx

Thanks for you help

B
9
S
1
G
3
Posts: 19
Reputation: 1,628

Post » Thu Feb 02, 2012 6:13 am

For the health regeneration check the HealthRegen group.

For the fade in, apparently changing the vision object's opacity rather than the layer's allow you to get the additive effect at all times.
I guess it is some webGL/HTML5 limitation else.

fixed capx
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Fri Feb 03, 2012 2:37 am

Thanks for the help, that makes way more sense to have the wait and the Boolean together.
B
9
S
1
G
3
Posts: 19
Reputation: 1,628


Return to How do I....?

Who is online

Users browsing this forum: Justin1967 and 22 guests