Bubble style health/mana

Get help using Construct 2

Post » Mon Jun 03, 2013 1:09 am

Good afternoon fellow creators.

Here is my issue, explained to the best of my ability.

My classmates and I are making a Gauntlet Arcade style game, blast all the bad guys spawning across the map, blast the boss and win, simple concept.

We are using a Diablo style health bubble with the mana ring around it. We have animated the health bubble using entirely too many events in my opinion. The health bubble reduces according to the total amount of HP on the PC.
The Mana bar I was trying a different event layout, I can get the bar to fill up when the game starts, but it will not set it's current frame to the global value it is assigned too.

This is the first time any of us have touched the program, so the answer is probably just out of our reach.

Thank you for any help!


Mana Animations


Health Animations


Health Events & Mana Attempt


HUD
Theelys2013-06-03 01:20:00
B
2
Posts: 2
Reputation: 338

Post » Mon Jun 03, 2013 1:22 am

What part of the health bubble actually animates? Does the liquid flow around, or the reflection bubble animate?

To answer your question. Anytime in your game when the Mana goes down, set the mana frame = to the global variable (if that is how you are doing it). Think of the code moving top to bottom, so set the frame after you alter the global variable.

Does that make sense?

ArcadEd2013-06-03 01:30:09
B
100
S
31
G
11
Posts: 1,552
Reputation: 21,522

Post » Mon Jun 03, 2013 2:09 am

For the way you're doing MP:
[code]Set Frame = round(CurrentMP/MaxMP * MPMeter.TotalFrames)[/code]
For the way you're doing HP:
[code]Set Animation = "hp" & round(CurrentHP/MaxHP * HPMeter.TotalAnimations)*10[/code]
That should do it. Haven't tested the second method yet, but it's based off of the first.TL222013-06-03 02:11:29
B
85
S
30
G
8
Posts: 308
Reputation: 10,562

Post » Thu Jun 06, 2013 5:22 pm

Thank you ArcadEd and TL22, your help is greatly appreciated, got things working much better now.

Meant to thank you a couple days ago but could not post, some server issue.

Thanks again!
B
2
Posts: 2
Reputation: 338


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests