ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is %location1% and %location2% useable in tasks?

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 %location1% and %location2% useable in tasks?

Postby DazaKiwi » Sun May 19, 2019 5:35 am

I'm having a bit of trouble with using # %location1% %location2%, the restriction doesn't seem to have Referenced Location 1 or Referenced Location 2 like it normally does for characters and objects. I haven't needed to param two locations before until now, but it seems you can't? unless my brain is currently running on fumes.
User avatar
DazaKiwi
 
Posts: 647
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Is %location1% and %location2% useable in tasks?

Postby Denk » Sun May 19, 2019 2:23 pm

DazaKiwi wrote:I'm having a bit of trouble with using # %location1% %location2%, the restriction doesn't seem to have Referenced Location 1 or Referenced Location 2 like it normally does for characters and objects. I haven't needed to param two locations before until now, but it seems you can't? unless my brain is currently running on fumes.

According to http://help.adrift.co/ only the following references exists:
adrift Code: Select all
A full list of references that ADRIFT understands is as follows:
%object1%, %object2%, %object3%, %object4%, %object5%, %objects%,
%character1%, %character2%, %character3%, %character4%, %character5%, %characters%,
%direction%, %number%, %text%, %location% and %item%.
You can also use %object% and %character% as shorthand for %object1% and %character1%.


Thus %location1% and %location2% are not possible.

A workaround is to use %location% and %item% in the same task. Here you can use restrictions to ensure that %item% is a location. Unfortunately, it is very limited what actions can be carried out with %item%. Thus if you want to do some more advanced actions with the item, you must pass %item% as a parameter to a task, which uses %location% as a reference.

I made a small demo, which uses this workaround:
Attachments
LocationsDemoV2.taf
(15.08 KiB) Downloaded 17 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 277
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: Is %location1% and %location2% useable in tasks?

Postby DazaKiwi » Mon May 20, 2019 12:08 am

Thank you Denk for taking time out to create a little demo. That is a cool work around. I've never seen %item% used and i had to really look around in the manual to find that info about the references adrift understands.

adrift Code: Select all
%item% is a special case.  This will match against any item reference (i.e. %object%, %character% or %location%).  T
User avatar
DazaKiwi
 
Posts: 647
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21


Return to ADRIFT 5.0

Who is online

Users browsing this forum: MSN [Bot] and 4 guests