ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Object inside object, inside object

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.

Object inside object, inside object

Postby P/o Prune » Mon May 11, 2020 5:07 pm

Is this possible without too much fuss and rocket science?

My PC has a backpack and a wineskin.
In the beginning of the game he puts the winskin inside the backpack. Then later on he comes across some beer that he is supposed to fill the wineskin.
General task:
Commands:
[fill] {the} [wineskin/skin]
[pour] {the} [beer] [in/into] {the} [wineskin/skin]
[fill] {the} [wineskin/skin] [with] {the} [beer]

Restrictions:
Character Player must be at location Rusty's Inn
Character player must be holding object A leather wineskin
Variable water must be equal to 0
Task Gathering pitchers at Rusty's must be complete,

Action:
Move object Some beer inside object A leather wineskin
Set variable beer to 1
Move pitchers to location Rusty's Inn

It all works as supposed if the wineskin is not inside the backpack. But if it is, the beer will be placed inside the backpack and not inside the wineskin.

> pour beer into wineskin
You unscrew the spout of the wineskin and one after the other, you pour the beer from the tankards and mugs into it.
Once you're done, you screw the spout back on again and put down the tankards.

> i
You are wearing a pair of homespun pants, a compass, a homespun cotton shirt and your briefs, and are carrying a magic rope, an old backpack, a slingshot and some smooth pebbles. Inside the old backpack is the leather wineskin and the beer.
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 97kb
User avatar
P/o Prune
Site Admin
 
Posts: 4608
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 93

Re: Object inside object, inside object

Postby Denk » Mon May 11, 2020 7:45 pm

Even though the text says " Inside the old backpack is the leather wineskin and the beer.", the beer is still inside the wineskin. Try to examine the wineskin, then the game should tell you that the beer is inside the wineskin.
I suppose you are either using the unreleased version 36 or saabie's library.

In v35 it is working as it is supposed to. The inventory uses the expression: %ListObjectsOnAndIn[%Player%.WornAndHeld]%
which will give you a sentence like: "Inside the backpack is a wineskin. Inside the wineskin is some beer."

But saabie's library (and perhaps also v36?) uses: %object1%.Contents.List(False)
which will give you: "Inside the backpack is the wineskin and the beer." even though the beer is inside the wineskin.

If you prefer the old (v35) behaviour, you can copy the Inventory-task from a v35-game into your v36 game. But be careful: If you open a v35-game in v36, ADRIFT will overwrite the old library tasks unless you have unticked all libraries. Make sure you don't ruin an old v35-game so make a backup before opening v35-games in v36.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 465
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 7 guests