How do I make text equal a variable

Get help using Construct 2

Post » Thu Sep 15, 2016 6:46 am

So I added this topic on here earlier. I thought I figured it out ,but uh... Here we are! Anyways what I mean is like. Let's say a variable originally equals 13. Then if a random event happens... A key is pressed or, the player touches it. Then the text would change to 12, or 14. Or even 5. Just make the variable change the text to equal variable.
B
8
S
1
Posts: 11
Reputation: 424

Post » Thu Sep 15, 2016 7:04 am

If you just want to set a text to a variable it is as simple as this. You can use a trigger to change it or just do it every tick if you want.

Image

Code: Select all
So on "M" pressed --> add 10 to Score --> Set text to Score


That would add 10 to the Score variable and then set the text to the new value.
B
55
S
24
G
13
Posts: 763
Reputation: 12,567

Post » Thu Sep 15, 2016 8:24 am

In case you mean that you are stuck on the format it takes, it's "text"&variable, the &symbol allows you to display the variable in the text box.
B
46
S
16
G
76
Posts: 2,150
Reputation: 45,313

Post » Tue Sep 20, 2016 8:15 pm

I could of sworn I replied. Anyway thanks!
B
8
S
1
Posts: 11
Reputation: 424


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], R0J0hound and 28 guests