Page 1 of 1

disambiguation in adjacent location

PostPosted: Fri Apr 26, 2019 2:05 pm
by Denk
I have a situation where the player character is hiding in one location. From this location he can see some bandits in another location and is able to cast a zapp-spell on them from his hiding place. To allow for this I have the following restrictions in my "zapp %character%" general task:
(THE PLAYER CHARACTER MUST BE VISIBLE TO REFERENCED CHARACTER) OR
(REFERENCED CHARACTER MUST BE AT LOCATION 'FOREST' AND
THE PLAYER CHARACTER MUST BE AT LOCATION 'BEHIND STONE' )

If I go to the forest I am able to zapp both bandits one by one with the command "zapp bandit". I am then given the question: "which bandit? A huge bandit or a strong bandit"
I can then answer "huge" or "strong" and the game will understand.

But if I stay behind the stone, and type "zapp bandit" I get the response:
"You can't see any bandit!"

So I am not getting the question "which bandit? A huge bandit or a strong bandit".
But if I specifically type "zapp huge bandit" or "zapp strong bandit" it works.

Can anyone help me to get the right behaviour when typing "zapp bandit" at location 'behind stone'?

I have made a small demo demonstrating the problem:
demo.taf
(15.6 KiB) Downloaded 32 times

Re: disambiguation in adjacent location

PostPosted: Sat Apr 27, 2019 4:24 am
by saabie
This should work and looks like a bug in ADRIFT.
In fact the debugger output says "Multiple matches. Prompt for ambiguity" so it almost works and then goes wrong somehow, probably in the scope handling for visibility.

You may need to bypass this by creating a general task for "zapp bandit" that prints the question: "which bandit? A huge bandit or a strong bandit", and then general tasks for "huge {bandit}" and "strong {bandit}" that replace the normal disambiguation. (All with restrictions to only work behind the stone)

Re: disambiguation in adjacent location

PostPosted: Sat Apr 27, 2019 8:36 am
by Denk
Thanks Saabie for looking at it. I have made a bug-report here: http://www.adrift.co/bug/19203