Health (Behaviours)

Discuss Scirra's 2D Asset Store

Post » Fri Mar 04, 2016 10:55 am



Health — Now for sale in the Scirra Store!
https://www.scirra.com/store/construct2-behaviours/health-2133

Traditionally, to implement a health system, you would create an instance variable named "Health" or "HP" for each object that needs it, then you would check it to see if it goes below 0 and play a death animation or destroy the instance.

You can even be clever and use a family variable. That's all good, but it gets tedious in the long run when you need health management in a lot of projects or prototypes and have more important features to worry about.

What if you needed your hero to have armor? To be invincible after drinking a potion? What if you need your crates to have a health system and drop loot after they are destroyed?

You can easily implement these features using some events, but after a few times the process gets boring, repetitive and time consuming.

Health management is a common feature in a lot of games, this behavior will help you save time and instantly manage the health of your characters and other game entities. There is no need to reinvent the wheel anymore.

Features

  • Easily add health mechanics to your hero, characters, spaceships, enemies, and even loot crates and boxes
  • Need to make your hero invincible after drinking a potion? Invincibility is included and can easily be turned on or off at any time
  • Need your hero to have armor? Just add this behavior twice, and name the second instance "Armor"
  • Solid and flexible health system that saves you precious development time
  • Easily understandable ACEs with clear descriptions, you don't even need a manual ...
  • A detailed and succint manual is provided
  • Death, Damage and Healing conditions to easily trigger your sound effects, particle systems or "death"/"hurt" animations.
  • An example capx project is provided in order to test the behavior and quickly see how it works


Use this topic to leave comments, ask questions and talk about Health
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781

Post » Fri Mar 04, 2016 11:04 am

Ah a nice little plugin! I'll be sure to use this in the future :D
B
12
S
2
G
1
Posts: 42
Reputation: 879

Post » Sat Mar 05, 2016 2:59 am

russellit wrote:Ah a nice little plugin! I'll be sure to use this in the future :D


Thank you ;)
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781

Post » Mon Apr 11, 2016 3:43 pm

To be honest, could you not just use instance variables instead of buying a behavior? :?
B
7
S
4
Posts: 3
Reputation: 765

Post » Wed Apr 13, 2016 12:26 am

AcidicAlloy wrote:To be honest, could you not just use instance variables instead of buying a behavior? :?


Sure! However, if you are going to do it over and over again for every prototype or game you make, you are going to waste a lot of time.

You'll have to account for the bugs that you may make again and again, all this time adds up. Plus, this behavior has some cool conditions that are triggered when the object is hurt, healed, dead, etc. You can make an object invincible very easily, all this is tested and works 100%, think about all the time and headaches you are going to save.

I made a lot of things in Construct 2 and other tools, and it is always the small stuff that takes time away from the project. Are you familiar with the 90% 90% rule? Google it!

I only release an addon after months and months of using it on live projects, I make them as easy to use as possible, I also make sure they have no bugs, I have a rigorous QA process that I go through for each and everyone of my addons.

Of course you are free to keep using instance variables and the event sheets, the plugin's code is not rocket science, there's even a page on how to implement it on the beginner tutorials, I'm just trying to help developers like you and me save time and not reinvent the wheel for every new project.
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781

Post » Wed Apr 13, 2016 3:33 pm

Ok, thx for clearing that up. It does take a while to do instance variable events :)
B
7
S
4
Posts: 3
Reputation: 765

Post » Wed Jun 29, 2016 6:21 pm

This behavior add-on is quite nice however it cannot be used with the Fade Actions. Please fix this as soon as possible.
B
7
S
5
G
6
Posts: 3
Reputation: 3,781

Post » Thu Jun 30, 2016 7:29 pm

Gaffy wrote:This behavior add-on is quite nice however it cannot be used with the Fade Actions. Please fix this as soon as possible.


What do you mean? Can you give an example?

I've been using this behavior for all my games with no problem, even with the fade behavior. If you have a specific case, I'll be glad to help you out.
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781

Post » Fri Jul 01, 2016 12:20 am

I cannot use Fade on my sprites that have Health behaviour. I still love your add on and would recommend it to anyone looking to speed up there game development.
B
7
S
5
G
6
Posts: 3
Reputation: 3,781

Post » Fri Jul 01, 2016 3:08 am

Gaffy wrote:I cannot use Fade on my sprites that have Health behaviour. I still love your add on and would recommend it to anyone looking to speed up there game development.


I'm afraid your problem has nothing to do with my addon. Would you care posting a capx?

I just created an empty project, added a sprite, then added Health and Fade behaviors to it. I set the fade "wait time" to 1 and "fade out time" to 3. When running the game, the sprite waits for 1 second, then fades out in 3 seconds.

Please test it, and if you have further problems you can shoot me an email, I'm always ready to provide support for my products. However, the problem that you described has nothing to do with my addon, it would be a shame if that prevented you from using it.
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781

Next

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 0 guests