The place to discuss the ADRIFT Interactive Fiction toolkit

Making a notebook the player can write in

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Making a notebook the player can write in

Postby ElliotM » Fri May 13, 2011 8:00 pm

I'm trying to make a demo where the player can write in a notebook and later read the notebook and see what they wrote.

The "[write] %text%" task works fine, but I think I might need to reference the object being written in if I'm going to make a general task out of this. My options then are "[in %object% write] %text%" or "[write in %object%] %text%" because I think %text% needs to be last, otherwise I don't think Adrift will find the %object% reference.

I also have another choice for implementation depending on whether or not I want to use a text array or append %text% to the %object% read description.

Text arrays are neat, which I could use to simulate the pages of a notebook; each entry as a single page. If I went this route, I would like to have a "[read] %object% {page %number%}" task. However, I'm not sure how to get an integer out of the player input and I'd like to avoid using the popup function if I can. If I can target specific pages by getting a number from the player input, this would allow me to create an edit/replace task for erasing if I wanted to go that direction. In order to read everything that was written, I'd probably need to do some string building with a loop.

However, it might be easiest just to append %text% to the read %object% description because this means we can use less variables that are tied to specific objects and I'm leaning towards this version at the moment, though I will need to find out what the property key of the readable description is. What I plan to do is set the Referenced Object Description When Read to "Description When Read" + %text%" in the expression field.
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Return to ADRIFT 5.0

Who is online

Users browsing this forum: MSN [Bot] and 1 guest