HELP using * expression

Get help using Construct 2

Post » Wed Dec 10, 2014 6:23 pm

Ok I am making a cookie clicker clone where you have to click a computer and buy upgrades and I want to be that everytime you buy a upgrade its price increases by *3 and the price is a global value. So here is what I have on my system>add to value: | gpuupcost *3 | so I put that and at first it times it by 4 then its just random?? gpuupcost is the global value im trying to times. So if someone could help me that would be great.
B
3
Posts: 4
Reputation: 183

Post » Wed Dec 10, 2014 6:38 pm

You are adding 3 times the value to the value itself, so you get 4 times. Then 16, then 64... What you have to do is use "Set value".
B
74
S
31
G
26
Posts: 994
Reputation: 20,198

Post » Wed Dec 10, 2014 6:50 pm

This is because you are using "add-to-value" which means

PRICE = PRICE + 3*PRICE

instead use "set value" and set it to 3*PRICE, that equates to

PRICE = 3*PRICE


R
B
7
S
3
G
1
Posts: 184
Reputation: 1,352

Post » Wed Dec 10, 2014 7:42 pm

Thanks @rho your solution worked!
B
3
Posts: 4
Reputation: 183


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests