How do I increase a int in text?

Get help using Construct 2

Post » Tue Apr 04, 2017 9:43 am

Hello i've an object that generating random number between (1-10) and i have a text that spawn lets say every 5 seconds. If that text have a collision with another text it'll add the number.

Like : text = 4
Number = 8

text = 12 and all collisions will be destroyed except this.

Thanks in advance for your help.
B
9
S
2
G
1
Posts: 1
Reputation: 1,090

Post » Tue Apr 04, 2017 10:27 am

Recommend using an instance variable to store the value of the object to do calculations with, and seeing the text to display that instance variable after.

Use pick nth instance condition to get the first (0th) or second (1) instance in a collision event to destroy. You can also use object(0).Value+object(1).Value to access each instance's values.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests