ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

need help - player inputting text

The place to chat about ideas, writing, this forum, or anything related to Interactive Fiction that isn't specific to ADRIFT.

Please also visit the Interactive Fiction Community Forum for further discussions.

need help - player inputting text

Postby Lumin » Thu Dec 08, 2011 11:42 pm

It's been waaay too long since I did any substantial work on one of my many, many WIPs, so I've started fooling around with an old project of mine, but almost immediately hit a brick wall. I really need is a way for the player to keep notes. None of that lame hand-holdy stuff where I write down clues for you...you gotta figure out what's important and do it yourself. But at the same time I don't want a word program or (heaven forbid!) pencil and piece of paper to be required to play the game, so what I'd like is some in-game way for the character to write text on a notebook object. I know it's got to be possible somehow and might very well be just some simple %something% I'm missing.

:anyone:
User avatar
Lumin
 
Posts: 1951
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: need help - player inputting text

Postby saabie » Fri Dec 09, 2011 2:59 am

You could create a readable object and use a "write %text%" task to add lines to it.
Create a text variable called 'T1'
The task would have the actions:
Set variable T1 to %PropertyValue[Object1,ReadText]%&"<br>"&%text%
(Where Object1 is the key of the notebook)
and
Set property '... and description when read' of object 'notepad' to '%T1%

Here's an example:
Notepad.taf
(10.88 KiB) Downloaded 262 times
saabie
 
Posts: 964
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: need help - player inputting text

Postby Lumin » Fri Dec 09, 2011 3:18 am

Sweet, thanks!

And you even made an example! :D

I really ought to learn more about variables one of these days instead of just brute forcing everything with tasks in the most hamfisted way possible...
User avatar
Lumin
 
Posts: 1951
Joined: Fri Aug 06, 2004 5:48 pm
Points: 34

Re: need help - player inputting text

Postby P/o Prune » Fri Dec 09, 2011 6:02 am

I really ought to learn more about variables one of these days instead of just brute forcing everything with tasks in the most hamfisted way possible.

Yeah, right! One of these days :whistle:
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 58Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4372
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58


Return to General IF

Who is online

Users browsing this forum: No registered users and 3 guests

cron