Actual time and date as Ink variables?
I'm looking for a (relatively) simple way to get the actual (e.g. wall clock) time and date into Ink variables--is there any way to do this, short of calling C# functions?
I'm imagining a story that, for instance, would get scarier the closer to midnight it is read or played.
I've done a time based game where my alter time function wrapped hours every time it hit 24 and added 1 to my days variable. That's probably the simplest way to do it in ink. Below for the basics, you can, of course, add more detailed time tracking.
=== function advancetime(hours) { hours > 0.0: ~ alter(Hour, 1.0) ~ alter(hours, -1.0) {Hour == 24.0: ~alter(Day, 1.0) ~Hour = 0.0 } ~advancetime(hours) }
Which relies on this (Useful) function borrowed from the documentation.
=== function alter(ref x, k) === ~ x = x + k