I've been revamping my main TWINE Project, heh. Well. I'm having some issues. And it's probably something obvious or inefficient. I now am trying to sort of do a psuedo-time system - where it's mostly superficial - it affects the 'events' in the game, and who the bouncer 'might' be through the 'either' macro. It keeps insisting there's a bad 'set' evaluation in StoryInit, but I have no idea why or how. It essentially picks the 'day' at random at first startup, and SHOULD pick the bouncer at random, and one of four events that may happen that day. (There's sometimes 4 events in one day, others only one.)
<<set $Days to {
sunday: {
day: "Sunday",
obouncer: "Gahlan",
hbouncer: "Jonas",
sbouncer: "Anwyn",
gbouncer: "Leon",
1event: "Zorcoball Brawling Night",
2event: "Dwarf Blood Ball Games"
},
monday: {
day: "Monday",
obouncer: "Anwyn",
hbouncer: "Jonas",
gbouncer: "Gahlan", /* May not have him here */
1event: "Horns and Hooves",
2event: "Satyr's Blessings",
3event: "Bonding with the Family"
},
tuesday: {
day: "Tuesday",
hbouncer: "Jonas",
sbouncer: "Anwyn",
obouncer: "Gahlan",
1event: "Open Karoke Mic Night"
},
wednesday: {
day: "Wednesday",
hbouncer: "Jonas",
obouncer: "Gahlan",
sbouncer: "Anwyn",
1event: "Diety's Gatherings",
2event: "Etheral Competition",
3event: "Bear Cuddles"
},
thursday: {
day: "Thursday",
hbouncer: "Jonas",
obouncer: "Gahlan",
sbouncer: "Anwyn",
1event: "Gaming Night",
},
friday: {
day: "Friday",
sbouncer: "Anwyn",
hbouncer: "Jonas",
obouncer: "Gahlan",
gbouncer: "Leon",
1event: "Unity of Bands"
},
saturday: {
day: "Saturday",
hbouncer: "Jonas",
obouncer: "Gahlan",
sbouncer: "Anwyn",
gbouncer: "Leon",
1event: "Dreams of the Shifters",
2event: "Orc Pridehood Feast",
3event: "Centaurs and Cowboys",
4event: "Gathering of the Cloaked Clans"
},
}>>
And this is what I was doing to 'check' what day it was, and the bouncer in question, and events.
Plus I was setting the day with this code - in StoryInit.
<<set $today to either($Days["sunday"].day, $Days["monday"].day, $Days["tuesday"].day, $Days["wednesday"].day, $Days["thursday"].day, $Days["friday"].day, $Days["saturday"].day)>>
And this below is supposed to be a 'condition' check. If it's Sunday, set particular event to 1 to 4 events. And if conditions to pick particular 'bouncers'.
<<if $today is $Days["sunday"].day>>
<<set $event to either($Days["sunday"].1event, $Days["sunday"].2event)>>
<<if $event is $Days["sunday"].1event>>
<<set $bouncer to either($Days["sunday"].hbouncer, $Days["sunday"].sbouncer, $Days["sunday"].gbouncer)>>\
<<elseif $bouncer is $Days["sunday"].2event>>\
<<set $bouncer to $Days["sunday"].obouncer>>
<</if>>\
<<elseif $today is $Days["monday"].day>>
<<set $event to either($Days["monday"].1event, $Days["monday"].2event, $Days["monday"].3event)>>
<<if $event is $Days["monday"].1event>>
<<set $bouncer to either($Days["monday"].sbouncer, $Days["monday"].hbouncer, $Days["monday"].obouncer)>>\
<<elseif $event is $Days["monday"].3event>>
<<set $bouncer to $Days["monday"].sbouncer>>
<<elseif $event is $Days["monday"].2event>>
<<set $bouncer to either($Days["monday"].sbouncer, $Days["monday"].obouncer)>>
<</if>>\
<<elseif $today is $Days["tuesday"].day>>
<<set $event to $Days["tuesday"].1event>>
<<set $bouncer to either($Days["tuesday"].obouncer, $Days["tuesday"].hbouncer, $Days["tuesday"].sbouncer)>>
<<elseif $today is $Days["wednesday"].day>>
<<set $event to either($Days["wednesday"].1event, $Days["wednesday"].2event, $Days["wednesday"].3event)>>
<<if $event is $Days["wednesday"].1event>>
<<set $bouncer to either($Days["wednesday"].sbouncer, $Days["wednesday"].hbouncer, $Days["wednesday"].obouncer)>>\
<<elseif $event is $Days["wednesday"].2event>>
<<set $bouncer to either($Days["wednesday"].sbouncer, $Days["wednesday"].hbouncer, $Days["wednesday"].obouncer)>>\
<<elseif $event is $Days["wednesday"].3event>>
<<set $bouncer to either($Days["wednesday"].sbouncer, $Days["wednesday"].hbouncer, $Days["wednesday"].obouncer)>>\
<</if>>\
<<elseif $today is $Days["thursday"].day>>
<<set $event to Days["thursday"].1event>>
<<set $bouncer to either($Days["thursday"].sbouncer, $Days["thursday"].hbouncer, $Days["thursday"].obouncer)>>\
<<elseif $today is $Days["friday"].day>>
<<set $event to Days["thursday"].1event>>
<<set $bouncer to either($Days["friday"].sbouncer, $Days["friday"].hbouncer, $Days["friday"].obouncer, $Days["friday"].gbouncer)>>\
<<elseif $today is $Days["saturday"].day>>
<<set $event to either($Days["saturday"].1event, $Days["saturday"].2event, $Days["saturday"].3event, $Days["saturday"].4event)>>
<<if $event is $Days["saturday"].1event>>
<<set $bouncer to either($Days["saturday"].sbouncer, $Days["saturday"].hbouncer, $Days["saturday"].obouncer, $Days["saturday"].gbouncer)>>\
<<elseif $event is $Days["saturday"].2event>>
<<set $bouncer to $Days["saturday"].obouncer>>\
<<elseif $event is $Days["saturday"].3event>>
<<set $bouncer to either($Days["saturday"].sbouncer, $Days["saturday"].hbouncer, $Days["saturday"].obouncer, $Days["saturday"].gbouncer)>>\
<<elseif $event is $Days["saturday"].4event>>
<<set $bouncer to either($Days["saturday"].sbouncer, $Days["saturday"].hbouncer, $Days["saturday"].gbouncer)>>
<</if>>\
<</if>>
Everything 'seems' to look OK to me, but I could be doing the IF conditions 'wrong', like it can't be $event is $Days...etc. I hope this can be cleared up - I'd love to get this working.