ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Exits improperly displayed

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.

Exits improperly displayed

Postby Mystery » Sun Feb 05, 2017 5:27 am

I've got two rooms that are part of a group. I have an object "secret passage", that is hidden until a task is completed (and moved back to hidden on an event timer/task and rest). My problem lies in that I can immediately try to go in the direction that the secret passage leads to. Although I should not know an exit exists, immediately upon starting and trying to go IN, I get the response "There is no route in, only west and in."

I've been playing around with trying to do a secret passage for a few hours, using several different methods, properties, tasks, alternate descriptions, etc. While I was able to get a few different methods to run, I had some issues getting the variety of descriptions that I wanted to have. I have no doubt my very very limited knowlege of V5 is to blame.

If anyone has any pointers or a sample to accomplish this, I'd love to see it.

Basically I am looking to have two locations share a secret passage. The secret passage may initially appear different, depending on which room you are in (and possible what object you examine. Example-one location may have a bookcase that hides a secret passage, while on the other end of it, it may appear as a plain stone wall. Whether you are in the room, or examining the bookcase, I would the description to be displayed accordingly.

:Thanks:
~Myst~
User avatar
Mystery
Moderator
 
Posts: 4765
Joined: Sun Jun 23, 2002 4:32 pm
Location: Virginia Beach, Virginia USA

Re: Exits improperly displayed

Postby Po. Prune » Sun Feb 05, 2017 9:33 am

I have something similar in my game Anno 1700
I can send you the .taf file if you want, but if I remember correctly I used tasks to go from one room to the other via the secret tunnel.

Something like:
Task: Secret Tunnel
Command: Move closet
Restriction: Player must be in room study
Action: Move object secret tunnel to room Study

Task: Move to other room
Command: enter/go East
Restriction: Object Secret Tunnel must be in room Study
Action: Move player to location Hidden room
Action: Look

You can do this two ways. Either, like in the example above, move the player directly to the hidden room, or create an extra location (the Secret Tunnel) and allow the player to move on from there..

I hope this helps.
D-Day V.5 in progress 79Kb so far (slowly getting there)
Anno 1700 in progress 111Kb
User avatar
Po. Prune
Moderator
 
Posts: 3945
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark

Re: Exits improperly displayed

Postby saabie » Mon Feb 06, 2017 1:13 am

Mystery wrote:"There is no route in, only west and in."
That is clearly a bug in the standard library, I will put in a bug report.
As a workaround you could edit the restriction message in the player movement task to remove that part of the message:
There is no route <# IF(%direction% = "Up" OR %direction% = "Down" OR %direction% = "In" OR %direction% = "Out", "", "to the ") #>%LCase[%direction%]%.

I whipped up a quick demo, is this anything like what you want?
SecretPassage.taf
(16.29 KiB) Downloaded 41 times
saabie
 
Posts: 834
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia

Re: Exits improperly displayed

Postby Mystery » Sat Feb 11, 2017 5:29 pm

Thanks,

I've never been real big on using a work-around for bugs.

The method I am currently using for the secret passage does not use a task to move the player, but rather uses the default directions, with a restriction that an object "secret passage" must not be hidden. I do have a task to trigger the secret passage to become visible, and a timed variable to close the passage. This works pretty well, it just took me a long time to figure out the mechanics of using it properly.

I had initially wanted to use a location state (must have state secret passage) rather than on object, but I could not get it work correctly with location groups. While I do have it working satisfactory now, I am going to play around with it a little more to see if there are other alternatives that are simpler to implement.
~Myst~
User avatar
Mystery
Moderator
 
Posts: 4765
Joined: Sun Jun 23, 2002 4:32 pm
Location: Virginia Beach, Virginia USA

Re: Exits improperly displayed

Postby saabie » Tue Feb 14, 2017 12:34 am

Denk has found that the correct solution to this problem is to replace
%Player%.Location.Exits.List
with
%ListExits[%Player%]%
in the restriction of the Player Movement task of the standard library.
saabie
 
Posts: 834
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia

Re: Exits improperly displayed

Postby DazaKiwi » Tue Feb 14, 2017 8:06 am

saabie wrote:Denk has found that the correct solution to this problem is to replace
%Player%.Location.Exits.List
with
%ListExits[%Player%]%
in the restriction of the Player Movement task of the standard library.


We should vote this up to get this fixed once and for all, only 3 votes so far
http://www.adrift.co/bug/19161&action=vote&vote=1
User avatar
DazaKiwi
 
Posts: 480
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand

Re: Exits improperly displayed

Postby Denk » Tue Feb 14, 2017 9:00 am

saabie wrote:Denk has found that the correct solution to this problem is to replace
%Player%.Location.Exits.List
with
%ListExits[%Player%]%
in the restriction of the Player Movement task of the standard library.


Note that before replacing the old expression with the new expression you need to add quotation marks, otherwise the expression will be stripped for Spaces and you can get responses like: There is no route to the north, only eastandsouth.

So to be precise:
replace
%Player%.Location.Exits.List
with
"%ListExits[%Player%]%" (remember the quotation marks!)

This had me puzzled for a long time, so I thought I would mention it.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 60
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests

cron