fixing bugs and figuring out how to actually write twine code


so i was figuring all of this out! this twine uses a bunch of stuff:

- all groups of things are set as arrays at the beginning of the game using the set array option. for example, all the social media stati are in arrays like this:

(set: $faceplacearray = (array:

"",

"",))

messages is a single file that cycles through an array like that. there's a variable that stores whether you're fed up, and removes options if you are.

(link: "Delete")[(set: $messagesarray to $messagesarray - (a: $mymessage))(goto: "First Message")

for example.

Skip removes messages and replaces them with filler about how the message isn't worth your time, using a similar thing. there's a small bug with it that I fixed hackily by adding a number. It's a bit oof. save does nothing (:) ).

The timed sections had to be felt out by hand, i'm just using a live loop on every story passage:

(live:1s)[ 

(set: $helloTimer to $helloTimer + 1)

(if: $helloTimer > 3)[$name: "Hello?"]

and revealing at specific times.

'skip' is actually really hard to implement. This version of it just copies Save. I was trying to do something like this:

(if: $fedup is 0)[(link: "Skip")[(set: $messagesarray to $messagesarray - (a: $mymessage))(if: $messagesarray contains "This message isn't worth your time.")[(print: "You've already skipped one; the phone auto-deletes this message.")(live: 3s)(goto: "First Message")](else:)[$(set: $mymessage to "This message isn't worth your time.")(set: $messagesarray to $messagesarray + (a: $mymessage))(print: "You don't want to deal with this. Skip!")(set: $messages = $messages +1)(live: 3s)(goto: "First Message")]]]


If you set the new array value to "string $var string" it actually saves the pointer, not the variable value, so it kind of screws everything up.

perhaps later I will fix this. :)

Files

existentialism (6).html Play in browser
Nov 18, 2019

Leave a comment

Log in with itch.io to leave a comment.