ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is this possible?

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.

Is this possible?

Postby P/o Prune » Tue Mar 13, 2018 11:07 am

I'm sorry the header isn't more clear, but I simply couldn't find out what to call this.

Just a thought.
Say you have a pc who gets knocked out in a random location... Let's call it location 1
He then wakes up in location 5 (easily done with a task) and there are people there telling him "We found you in "location 1" and carried you up here.

Is this doable in V.5? and if so, how would it be done?
D-Day V.5 in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 29Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4244
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: Is this possible?

Postby ElliotM » Tue Mar 13, 2018 1:54 pm

Absolutely. Create a property of type location and use it as a variable to remember where the player was last found. Then use dot operator syntax to put it in your text.

FoundInLocation Demo.taf
Best Practice Method - Use a property of type location
(15.5 KiB) Downloaded 27 times

The syntax to do that in my demo would be

adrift Code: Select all
Player.FoundInLoc.Name


  • 'Player' is the reference to the player character.
  • 'FoundInLoc' is the name of my character property of type location. The original name was FoundInLocation but the item key created was truncated to FoundInLoc so I just renamed the property to be the same text as it's key for ease of use.
  • 'Name' is the key name for the short description or location name.

Hope this helps. I did make use of the lower case converter in my demo. It is a text function that looks like this: %LCase[]%. To use it put your text inside [the brackets].
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Is this possible?

Postby P/o Prune » Tue Mar 13, 2018 2:46 pm

Thanks. I'll give it a go.
D-Day V.5 in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 29Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4244
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 10 guests