SOLVED///How do I add a value to a inst. var from a string?

Get help using Construct 2

Post » Mon Apr 20, 2015 4:00 pm

@korbaach

From what I get:
He'd like the program to do what I did in my capx, but in a way he can understand the events..

The value is changed, not in the string, but in the variable.
The string is only used to display the value of the variable.
Changing the value of the variable, will automatically change the display of the value within the string.

So when the x2 is clicked, the value of the variable is changed to 2x the original value of the variable.
when x2 is clicked a second time, the value of the variable should be changed back to the original value.
The string displays the value of the variable and because the value changes, the string displays the changed value.
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 » Mon Apr 20, 2015 4:21 pm

Thank you
I want to add an event to make 2* disappear ( reduce back the double size ) when pressed again. For the x2 button.
B
8
S
2
Posts: 110
Reputation: 923

Post » Mon Apr 20, 2015 4:28 pm

That's why in my capx I had the original value and the total value..
the total value was set to the original value when the first button was pushed..
when pressing x2, if the total value was the same as the original vaue, the total value was set to 2x the original value.
else the total value was set back to the original value..
If the total value was not 0, the text was added to the string.
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 » Mon Apr 20, 2015 4:57 pm

MangoPolo wrote:I want to add an event to make 2* disappear ( reduce back the double size ) when pressed again. For the x2 button.



capx:

http://s000.tinyupload.com/index.php?fi ... 7073965068
Image
B
63
S
23
G
7
Posts: 1,475
Reputation: 10,776

Post » Mon Apr 20, 2015 5:18 pm

I finally have what I was looking for during the last 4 days! :)
Thank you both! I will be using this version for now, as it is simpler to my understanding but I will try to migrate to the one @LittleStein offered, as it is less coding I guess. I will share with you guys my final work soon!
Thank you!

Here it is how I needed

s000.tinyupload.com/index.php?file_id=37290483716498034715
B
8
S
2
Posts: 110
Reputation: 923

Post » Mon Apr 20, 2015 5:31 pm

Ok.. Good luck on your program!
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

Previous

Return to How do I....?

Who is online

Users browsing this forum: blackhornet, Janaina, marcinkowski and 2 guests