Help with "game.Clock.Day"
How to create an interger attribute that changes every day, for example add +10.
Could someone help me. do not understand how "game.Clock.Day" works.
I have seen some example "Clock and Plant" "OSTime Demo" there, but I do not understand.
Could someone help me with something more streamlined
Many Thanks in advance
Best Answer
-
Marchief Posts: 98
@Espino I have done this recently, for a daily spin from midnight local time - you will need to capture 4 attributes as game variables.
- game.Clock.Day
- game.Clock.Month
- game.Clock.Year
- Your daily reset attribute
then apply a rule to your startup page or an actor where it is to be used.
if day > than day stored AND Month >= Month stored and Year >= Month stored
OR
month > month stored and year >= year stored
OR
year >= year stored
THEN
Update your reset attribute and action as required then store the current day,month and year.You will need to store the game attributes by name using the save attribute behaviour and load them in again when your start your game using load attribute.
This method also stops people skipping days ahead for free bonuses as when they change their date back to normal they will have a long wait until it triggers again.
Answers
Thanks Back2Code, for your answer and solve it, because when I see no help.
I did keeping three attributes, if not the best, but it works.
If you want a project you send me your sample method and I command mine. a greeting
Thanks for your answer and solve it, because when I see no help.
I did keeping three attributes, if not the best, but it works.
If you want a project you send me your sample method and I command mine. a greeting