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
i lisyn tu dat pigi un di rigt, end im nici tu u
B
11
S
1
G
2
Posts: 83
Reputation: 1,942

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
194
S
68
G
31
Posts: 5,966
Reputation: 47,096

Post » Sat Dec 10, 2011 10:17 am

Thank you Kyatric!
i lisyn tu dat pigi un di rigt, end im nici tu u
B
11
S
1
G
2
Posts: 83
Reputation: 1,942

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
30
S
8
G
4
Posts: 168
Reputation: 5,614

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 :)
i lisyn tu dat pigi un di rigt, end im nici tu u
B
11
S
1
G
2
Posts: 83
Reputation: 1,942

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
72
S
11
G
12
Posts: 1,479
Reputation: 14,491

Post » Sun Dec 11, 2011 4:09 pm

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

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
55
S
21
G
13
Posts: 1,466
Reputation: 15,536

Post » Mon Dec 12, 2011 10:38 am

Yes something like that :) this is good for rpg games :)
B
72
S
11
G
12
Posts: 1,479
Reputation: 14,491

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: MangoPolo, Sylverstone14, tunepunk and 7 guests