How do I make "attempt"?

Get help using Construct 2

Post » Fri Apr 15, 2016 7:30 am

Have a global number variable called "Attempt".
Insert a Text object in the layout, where you want the player to read the number of attempts.
In its Properties set the text to "Attempt 1".
When the player dies/fails, add 1 to that variable and set that text to "Attempt &Attempt".
B
6
Posts: 9
Reputation: 272

Post » Fri Apr 15, 2016 7:47 am

Gilpow wrote:Have a global number variable called "Attempt".
Insert a Text object in the layout, where you want the player to read the number of attempts.
In its Properties set the text to "Attempt 1".
When the player dies/fails, add 1 to that variable and set that text to "Attempt &Attempt".


Not quite.

The variable such be outside of the quotation marks, i.e.if the Global variable is called NumOfAttempts, then

Code: Select all
"Attempt: " & NumOfAttempts
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Fri Apr 15, 2016 7:54 am

Yeah, right.
B
6
Posts: 9
Reputation: 272


Post » Fri Apr 15, 2016 9:50 pm

Yeah, now you need a text to display the number of attempts.
B
6
Posts: 9
Reputation: 272


Post » Sat Apr 16, 2016 1:14 pm

Dumbfounded Game wrote:@Gilpow
I did & it didn't worked...

http://prntscr.com/asy13m
http://prntscr.com/asy16y
http://prntscr.com/asy1b4


This will resolved much quicker and easier if you include your .capx.

What you are trying to achieve really shouldn't be this difficult, which implies something is not setup correctly in your project.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Sat Apr 16, 2016 2:19 pm

You also need to update the text object on collision with the trap to reflect the changed number :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 201
Reputation: 3,460

Post » Sat Apr 16, 2016 4:13 pm

B
25
S
11
G
9
Posts: 136
Reputation: 6,657

Next

Return to How do I....?

Who is online

Users browsing this forum: jaytrott86 and 8 guests