Text style life bar

Get help using Construct 2

Post » Wed May 13, 2015 11:41 am

how to add text style life bar to my game for example- Health:20 in the game which can decrease or increase
Last edited by prashant3999 on Wed May 13, 2015 11:43 am, edited 1 time in total.
B
9
S
4
G
1
Posts: 89
Reputation: 1,498

Post » Wed May 13, 2015 11:43 am

Assuming health is a variable the action would be

set text = "Health:"&variable
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 13, 2015 11:45 am

please explain in some detail you have written just variable
B
9
S
4
G
1
Posts: 89
Reputation: 1,498

Post » Wed May 13, 2015 11:48 am

What details would you want?
Are you unclear on what a variable is and/or how to use them?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 13, 2015 11:51 am

ok i have done it but it dose not decreasing or increasing with its own
B
9
S
4
G
1
Posts: 89
Reputation: 1,498

Post » Wed May 13, 2015 11:52 am

Have you made events for it to increase or decrease?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 13, 2015 11:53 am

yes ofcourse i have made enemies which destroys health
B
9
S
4
G
1
Posts: 89
Reputation: 1,498

Post » Wed May 13, 2015 11:54 am

How often is the text object updated?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 13, 2015 11:58 am

i have made instance variable of my player of Health and initial value 20 it just remains 20
B
9
S
4
G
1
Posts: 89
Reputation: 1,498

Post » Wed May 13, 2015 12:00 pm

Does the variable remain 20 or does the text keep showing 20?

Are you by any chance only setting the text on start of layout?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests