Hello!
I've been trying to figure out how to display a clock with the time and date (for a farming sim type game).
I followed this old
ORK 2 tutorial for time and date using initial variables on my new ORK 3 project and not I've been troubleshooting how to display that information. Any advice?
I'm still pretty dumb when it comes to the new UI system -- I tried to make a UI prefab with status text content and use text codes to display the variables, then hook it up with a information HUD but I can't get it to display any info. Is there a better way to display the values of these variables, or a better way to do a time system altogether with Makinom?
Generally, you can display the values of variables using text codes, like in ORK 2 (though the text codes are different now). As usual, you can add text codes via the buttons over the text area.
When dealing with changing values, enable the Use Time Update in the HUD text content components to update the content periodically.
The overall process for setting up something like this is still the same in ORK 3. There are new variable types, though, e.g. the Int type can be better suited here, depending on the changes you make each time (e.g. if you add the delta time to it, you'll need to use a Float type variable).
Makinom also added timers to automatically count down (or up) a time via a variable.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
" />
" />
Thanks as always for the response, GIL!
Here's what I'm working with now. Nothing at all is displayed with this set up. If I just replace it with dummy text, that text will show up on the screen, so I know the HUD is working (at least in the sense that it's displaying something). If I swap out the ORK HUD Status Text Content component for an ORK HUD Text Content component, it just displays "text."
If I call these variables in a dialogue box or something similar, it works, so I assume the issue is that information is just not making it to the HUD (rather than it not working at all). I'm probably missing something simple -- do you spot what's wrong?
So, unless you're using that HUD prefab in a combatant HUD, it'll probably not display anything for this component.
E.g. for an Information type HUD, use the HUD Text Content component instead.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I tried a HUD Text Content component before but I think I was using a different Content Provider component for the HUD at that time. This is working well now!
Thank you!
(1) Right now of course, the day is just displayed as a number. If I were to get it to display as a day of the week, such as 1 = Monday, etc., how would I go about that?
[Edit]: Now that I'm thinking about this more, I guess I could set up another Global Machine that pulls the value of the "day" variable and changes a string to a day of the week that corresponds to the number, then display that string on the HUD instead. I'll try that, but let me know if you have a better solution!
(2) "0" values for the minute variable are displayed as 0, naturally -- but on a clock, that'd be 00 (like when it's 8:00, it's displayed like that, not 8:0). How would I change that?
An alternative would be to use HUD Condition components to show different HUD content components based on the day variable.
2) Via a variable text code with format. I think 00 should display 2 digits at all time.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!