Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Days

4 years ago

The storygame I am currrently working on is based on days. Is there a way to make a day system where if the reader does a certain amount of actions, then it goes onto day 2? I hope I worded this correctly and if ou can help, that would be great. Thank!

Days

4 years ago
Can you make it? Yes.

Is there an existing one that you can just plug in? No.

You have to create a variable called "Hour" or something, add to that variable whenever they click a link, and when it gets to a large enough value then either use the "Variable event" to go to Day 2 page, or more scripting to get it done.

Days

4 years ago
First, go to Storygame Properties > Editor Features make sure you have Variables and Scripting set to Advanced. Then you can create a variable called something like %DAY, and another called %ACTION. Every time the player clicks a choice you want to count as an action, raise %ACTION by 1 in the link script. %ACTION := %ACTION + 1 Then you'll make a global link script with something like: IF %ACTION = 5 THEN %DAY := %DAY + 1 (You'll also want to reset %ACTION to zero somewhere in here so it can start the count over again.) And then have whatever you want %DAY to affect check for it whenever. That can be a global script too meaning it will check every time the player clicks a link, or you can put it somewhere specific in the game. If you want %DAY to move the player to a specific page to end the game or whatever once it gets high enough, you need to use a system task called $DEST. IF %DAY = 7 $DEST := @P28 Or whatever the page ID number is. If you're using chapters for organization this is how you jump back and forth between them as well. Also, just as general advice I'd recommend turning the Rich Text Editor off in your profile. (You'll need to log out and then in again for it to take effect.) You'll be able to see then it's adding a lot of unnecessary HTML tags and gibberish characters to your text to emulate "fancy" versions of apostrophes and quotations and the like. Sometimes this can interfere with scripting, and there are other glitches such as eating images you try to include. Most people writing storygames turn it off and just use plain text with HTML as needed for things like bold and italics. You may also want to get the site extension for Firefox or Chrome in Brad's profile, this will let you turn on dark mode and some other features as well as just generally giving the site a facelift.