I need to get the date and time tracked for a game I’m prototyping. I managed to get Days Hours Minutes and Seconds working but I want to add months and years. My current set up has Make Timespan which is working fine.
So instead of that “Set: Date and Time” node there, what you need to use is “Set Members of struct”. What you’re doing is telling it the TYPE of struct to use, I know, it’s a bit different.
But that’s how you can change an overall struct layout, then you use “Set Members” to set the individual pieces of the struct’s variables
Sorry I don’t know much about item structures. Could you elaborate further as I’m having trouble replacing the Make date Time node with the Set members of struct.
Okay. So it looks like you’re right, from start to finish, the whole thing looks pretty well set up. So testing is in order.
Printstrings. I’d throw some:
on DayNightCycle, after the delay and before the end. Call it anything unique.
Added test: set the delay ticks to .3 and watch to see if the delay’s just too fast.
Before, AND after the Set Members in DateAndTime Struct. First one use the “Seconds” FLOAT. Second one, plug in your minutes from make date time.
This should help give some insight on WHERE the issue is.
I went through and did the steps you suggested. The thing that is giving me some results is changing the delay form 0.001 to 0.3. When I print string after the "Set Members in DateAndTimeStuct it does spit out some numbers up to 59 once then goes back to 0. If I change the delay to any number lower than 0.3 it goes back to only returning 0.
OK! So the issue with the number skipping has to do with your time math. If you want it to be seconds=minutes, just use an Int for seconds, and +1 at the start, with a delay of 1.0 at the end. Then you’ll want to, before adding everything to the make date/time, do any conversions:
If Minutes = 60, +1 hour, set Minutes = 0 and so on.