Boolean Operation problem and Layer Effect problem

0 favourites
  • 3 posts
From the Asset Store
A total of 214 high quality and unique magic sound effects suitable for RPG, Battle Arena and more!
  • 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.

    Thanks for you help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Thanks for the help, that makes way more sense to have the wait and the Boolean together.

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