How do I add a variable amount for each amount of a variable

Just started using Construct 2? Post your questions here

Post » Sun Jan 29, 2017 1:52 am

So basically, let's say for every 5 houses you buy, you lose 5 moneys every 7 seconds. How do I do this without programming something like this:

Every 7 Seconds:

Houses > 4
Lose 5 Money
Houses > 9
Lose 5 Money
Etc.

Is there a way to simplify this so I don't need to keep on manually placing a command that tests the amount of bought houses; example shown above. The command that I don't want to keep manually placing is underlined.

Instead, I want to be able to just place one command that keeps on checking the amount of houses I buy, so every 7 seconds it'll check to see if I bought another 5 houses which would then decrease my money more.

I'm really sorry if I made no sense, I'm really tired right now.
B
17
S
5
G
11
Posts: 17
Reputation: 6,748

Post » Sun Jan 29, 2017 6:09 am

Every 7 seconds
-> Money - int(Houses/5)*5
ImageImageImage
B
71
S
22
G
248
Posts: 3,758
Reputation: 138,067


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests