# Need help with my farming game/check for realtime

Get help using Construct 2

### » Thu Feb 27, 2014 3:26 pm

@GeometriX
So I tried it now and yes, that is what i wanted!
My only question is:
Can I compare:
If tomato planted > Day = Today
if Day = Yesterday > tomato can be harvested.

Or is the time you set in your projekt exatly one day? I don't know because I set the harvest time to a lower number, so I haven't to wait so long.
Thanks
B
4
G
1
Posts: 25
Reputation: 373

### » Fri Feb 28, 2014 7:56 am

The events in my example are checking to see how long the plants have been in the ground. So you can set that to be any length of time you want - even a whole day. Just adjust the harvest time to whatever it is you need and it'll work, whether you want to set it to a minute or a day or a year. Bear in mind that Unix Time is measured in milliseconds.
B
57
S
15
G
11
Posts: 912
Reputation: 12,656

### » Fri Feb 28, 2014 4:25 pm

@GeometriX
Oh, ok
Thanks.
At the moment I'm going to make the game without real time, because it's easier to make it with out, but after I finished everything else, I will add it.
B
4
G
1
Posts: 25
Reputation: 373

### » Fri Feb 28, 2014 4:49 pm

To make your life easier, I'd suggest that you create a global variable to manage the real-time issue while you're still working on the game. This is very important to ensure you don't waste any time while developing but still use the exact same system that the player will ulimately use.

Assume this variable is called called HarvestMultiplier. So, set your plants to be whatever harvest length you want, and then create a single event Plants(family) On creation > Set HarvestLength to Plants.HarvestLength*HarvestMultiplier. If your multiplier is set to 1, it'll be real-time. If it's set to 0.1, it'll be ten times faster than real-time. 0.01: 100 times faster, and so on.

If you want, you can also come back to this later to adjust overall game speed from a single variable without having to manually change every plant, which will probably be a huge chore later down the line.
B
57
S
15
G
11
Posts: 912
Reputation: 12,656

### » Fri Feb 28, 2014 5:00 pm

@GeometriX
Thanks again!
It's a good idea!
B
4
G
1
Posts: 25
Reputation: 373

Previous