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
20
S
4
G
3
Posts: 136
Reputation: 2,779

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Dec 10, 2011 10:17 am

Thank you Kyatric!
B
20
S
4
G
3
Posts: 136
Reputation: 2,779

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
35
S
9
G
5
Posts: 174
Reputation: 5,916

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
20
S
4
G
3
Posts: 136
Reputation: 2,779

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
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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,479
Reputation: 16,346

Post » Mon Dec 12, 2011 10:38 am

Yes something like that :) this is good for rpg games :)
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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: DemantDigitalArt and 20 guests