intfiction.org

The Interactive Fiction Community Forum
It is currently Sun Nov 19, 2017 3:51 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jul 17, 2017 11:33 am 
Offline

Joined: Wed Jan 04, 2017 12:47 am
Posts: 134
Okay, so I'm not going to post any code, because I'm pretty sure there's a better way to do it than the way I have it currently.

At any rate, in my game I have a tutorial room and then another room in which the actual game takes place. This works fine when the player first starts out and plays the tutorial first, but I also have it written so that the player can return to the tutorial at any point in time. My issue is that if the player returns to the tutorial in mid-game, the main game continues to take place (i.e. the number of turns continues, the player is still carrying all the inventory from the main game, a running commentary that's been started from the main game continues, etc). Is there a way to code it so that when the player returns to the tutorial, it sort of "pauses" everything in the main game and then "unpauses" when they leave the tutorial?

At the moment, the code just transports them from one room to the other, using the commands "tut" and "end tut", if that helps any -- sort of like an XYZZY.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jul 17, 2017 12:00 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 976
To preserve inventory, you can make two characters, and say 'Now the player is Tutorial Sue' then 'Now the player is Real Marge'

Stopping time is harder. Look at example 407, Timeless, to get some ideas on how to stop time.

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jul 17, 2017 1:55 pm 
Offline

Joined: Tue Jul 28, 2015 1:05 pm
Posts: 976
An easy way to stop time is to turn 'every turn' rules into 'every turn when the player is Real Marge'; then the timers stop when you are someone else (such as the tutorial character).

_________________
-My IFDB name is Mathbrush.

Anyone can make interactive fiction; if you've made a game and need a review on IFDB, let me know!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jul 17, 2017 6:46 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2467
Location: The Midwest
Or make a new rulebook called "Every Real Turn", then make a single rule "Every turn when the location is not the Tutorial: follow the Every Real Turn rules."

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jul 19, 2017 1:10 pm 
Offline

Joined: Mon Dec 15, 2014 9:15 am
Posts: 215
Isn't this easier still?
Code:
The advance time rule does nothing when the location is the Tutorial.
Every turn when the location is the Tutorial: rule succeeds.

(The second rule should prevent subsequent Every Turn rules from running.)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Jul 19, 2017 4:59 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2467
Location: The Midwest
Oh, indeed it is! Clever!

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group