A health and limit in one text.

Get help using Construct 2

Post » Sat Dec 10, 2011 10:00 am

Hello! I don't know how to make a health and health limit in one text.

I need somenthing like that " "Health" &hp "/" &hplimit"

I'm naab :D
B
17
S
4
G
3
Posts: 132
Reputation: 2,682

Post » Sat Dec 10, 2011 10:10 am

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
241
S
83
G
36
Posts: 6,873
Reputation: 54,950

Post » Sat Dec 10, 2011 10:17 am

Thank you Kyatric!
B
17
S
4
G
3
Posts: 132
Reputation: 2,682

Post » Sat Dec 10, 2011 12:31 pm

Hehe, i had an event like that one, too.

If you didn't read this tutorial before, then you should: Native Expressions in Construct 2
B
34
S
8
G
4
Posts: 174
Reputation: 5,716

Post » Sat Dec 10, 2011 1:04 pm

[QUOTE=01lifeleft] Hehe, i had an event like that one, too.

If you didn't read this tutorial before, then you should: Native Expressions in Construct 2[/QUOTE]
I don't know only this one :)
B
17
S
4
G
3
Posts: 132
Reputation: 2,682

Post » Sun Dec 11, 2011 2:54 pm

how to do that the number of health that she could never be greater than max health?
B
91
S
17
G
32
Posts: 1,829
Reputation: 26,681

Post » Sun Dec 11, 2011 4:09 pm

You mean like this? demol33twash0r2011-12-11 16:09:56
B
27
S
3
G
5
Posts: 172
Reputation: 3,628

Post » Sun Dec 11, 2011 5:37 pm

Or by using the usefull clamp
clampHealth.capx
Last edited by Yann on Sun Sep 14, 2014 11:04 am, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,478
Reputation: 16,334

Post » Mon Dec 12, 2011 10:38 am

Yes something like that :) this is good for rpg games :)
B
91
S
17
G
32
Posts: 1,829
Reputation: 26,681

Post » Sun Mar 31, 2013 3:39 pm

Would this work with sprite variables as well as global variables?

so instead of ( Set Text to "Health: " & Health & "/" & Healthmax )

Would it be ( Set Text to "sprite1.Health: " & sprite1.Health & "/" & sprite1.Healthmax ) ?
Then ( Set sprite1.health to Clamp(sprite1.Health+5,0,sptire1.HealthMax) )


would that work for when you have several sprites controlled by the player? Say in like a FF style turn based rpg or a multiplayer gauntlet type game? I know they are super complex but as a just for instance.
B
1
Posts: 1
Reputation: 277

Next

Return to How do I....?

Who is online

Users browsing this forum: Hans the Red, thatserafimkid and 6 guests