minitaba
Member
hey, its me again with a problem haha
I am making a game with gardening features, and the plants work similar to the classic well known farming games.
You plant your seed, water it and it grows a little every day / few days and if you dont water them they dont grow and finally you harvest your crobs.
I am almost finished with the growing- and harvesting-system and now I came across a problem I can not find out how to fix.
When i leave the farm (room) the crops data gewts saved in a DS and when Entering the room they come back. I included the Sprites below them is they are watered or not (the soil just appears darker then) and the "watered" status of the crop as well.
watered = true; switches to =false at midnight, when a new day starts (you have to water them daily) which works as well.
But here is the issue:
When I am at the farm and the time goes by, everything works fine, but how can this work when I am not in the same room? The Age / Growstage of the plant is safed on, lets say, day 1, and i come back at day 2, the plant should have grown / have gone to a new growing Stage, but i can just use the data stored in the DS and dont change the plant when it doesnt exist.
I tried to add
but this did not work at all.
My saving script for the crops:
Anyone has an idea how to realize a working system to upgrade my growStage while the instances dont exist?
Thanks a lot : )
I am making a game with gardening features, and the plants work similar to the classic well known farming games.
You plant your seed, water it and it grows a little every day / few days and if you dont water them they dont grow and finally you harvest your crobs.
I am almost finished with the growing- and harvesting-system and now I came across a problem I can not find out how to fix.
When i leave the farm (room) the crops data gewts saved in a DS and when Entering the room they come back. I included the Sprites below them is they are watered or not (the soil just appears darker then) and the "watered" status of the crop as well.
watered = true; switches to =false at midnight, when a new day starts (you have to water them daily) which works as well.
But here is the issue:
When I am at the farm and the time goes by, everything works fine, but how can this work when I am not in the same room? The Age / Growstage of the plant is safed on, lets say, day 1, and i come back at day 2, the plant should have grown / have gone to a new growing Stage, but i can just use the data stored in the DS and dont change the plant when it doesnt exist.
I tried to add
Code:
if (daywhensafed < today) {daysOld += 1} to the Plant instances
My saving script for the crops:
Code:
Thanks a lot : )
Last edited: