Using Sugar Cube 2.28.2 and the latest release of Twine. I’m new to twine so I’ve been piecing things together from random sources. What I’m trying to do is have a repeated event on every Friday in game after you’ve talked to Ron. I got the concept of <<if $TalkedToRon == True/False>> down, but the date is messing me up. I’ve copy and pasted this block of code. I can’t find the page i got it from exactly.
This is the time system I have in place. I’m not sure what part of this code specifically is talking about Monday-Sunday so i’m not sure what to put. I’ve been fiddling around with it for a few hours now and i couldn’t find anything online.
/*
Date & Time Widget Setup
*/
<<set
/* This must be set to whatever the initial game date/time should be. */
$gameDate to new Date("2019-01-01T01:04Z"); /* Must use UTC time. */
>>
<<set
window.GameDays to [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
];
window.GameMonths to [
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
];
>>
/*
Date & Time Advancement Widget Definitions
*/
/* Adds the specified number of minutes. */
<<widget "addmins">>\
<<run $gameDate.setUTCMinutes($gameDate.getUTCMinutes() + $args[0])>>\
<</widget>>
/* Adds the specified number of hours. */
<<widget "addhours">>\
<<run $gameDate.setUTCHours($gameDate.getUTCHours() + $args[0])>>\
<</widget>>
/* Adds the specified number of days. */
<<widget "adddays">>\
<<run $gameDate.setUTCHours($gameDate.getUTCHours() + $args[0] * 24)>>\
<</widget>>
/*
Date & Time Printing Widget Definitions
*/
/* Prints the current date ("{weekday} {month} {day}, {year}"). */
<<widget "date">>\
<<print String.format("{0} {1} {2}, {3}",
GameDays[$gameDate.getDay()],
GameMonths[$gameDate.getMonth()],
$gameDate.getDate(),
$gameDate.getFullYear()
)>>\
<</widget>>
/* Prints the current time (12H). */
<<widget "time12h">>\
<<if $gameDate.getUTCHours() eq 0>>\
12\
<<elseif $gameDate.getUTCHours() gt 12>>\
<<print $gameDate.getUTCHours() - 12>>\
<<else>>\
<<print $gameDate.getUTCHours()>>\
<</if>>:\
<<if $gameDate.getUTCMinutes() lt 10>>0<</if>><<print $gameDate.getUTCMinutes()>> \
<<if $gameDate.getUTCHours() gte 12>>PM<<else>>AM<</if>>\
<</widget>>
/* Prints the current time (24H). */
<<widget "time24h">>\
<<if $gameDate.getUTCHours() lt 10>>0<</if>><<print $gameDate.getUTCHours()>>:\
<<if $gameDate.getUTCMinutes() lt 10>>0<</if>><<print $gameDate.getUTCMinutes()>>\
<</widget>>
/* Prints the current date and time (12H). */
<<widget "datetime">><<date>> <<time12h>><</widget>>