ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Help Needed With Functions

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.

Help Needed With Functions

Postby Lazzah » Sun Oct 21, 2018 1:55 pm

Hi all,

I want to list only the dynamic objects in a location in a LOOK IN CAVE task. Can someone knowledgeable with functions please tell me the correct one to use?

Many thanks in anticipation!
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2139
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Help Needed With Functions

Postby Denk » Mon Oct 22, 2018 12:41 am

The following function lists only dynamic objects in a location:

LocationKey.Objects.List

(replace "LocationKey" with the key of the location)

There are some options you may want to use, e.g. LocationKey.Objects.List(Indefinite) [this will replace e.g. "the box" with "a box"]
HTH
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 145
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 26

Re: Help Needed With Functions

Postby Lazzah » Mon Oct 22, 2018 10:17 am

Denk wrote:The following function lists only dynamic objects in a location:

LocationKey.Objects.List

(replace "LocationKey" with the key of the location)

There are some options you may want to use, e.g. LocationKey.Objects.List(Indefinite) [this will replace e.g. "the box" with "a box"]
HTH

Yes, thank you Denk, that helped a lot. :claps: :bravo: :yeah: :Thanks:

Just as a matter of interest, what function would I need if I wanted to list the STATIC objects in a location?
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2139
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Help Needed With Functions

Postby Denk » Mon Oct 22, 2018 4:42 pm

Lazzah wrote:Just as a matter of interest, what function would I need if I wanted to list the STATIC objects in a location?
That was a good question. I played around with it for a while and it seems that you can only list objects which are set to be listed. So for static objects to be listed, you must have ticked "Specifically list object in location description". The opposite is true for dynamic objects, where "Specifically exclude object from location description" must not be ticked.

So actually the function:

LocationKey.Objects.List

lists both dynamic and static objects IF the static objects are set to be listed in location description. And dynamic objects which are excluded from the location description will not be listed.

Of those set to be listed, you can choose only to list the dynamic objects or only the static objects using either:

LocationKey.Objects.DynamicLocation.List

or:

LocationKey.Objects.StaticLocation.List

I hope this makes sense.
-----------------------------------------------------------------------------------------
Out now: The Royal Puzzle, The Way Home & The Dragon Diamond
-----------------------------------------------------------------------------------------
Denk
 
Posts: 145
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 26

Re: Help Needed With Functions

Postby Lazzah » Mon Oct 22, 2018 8:35 pm

Thanks Denk, that was very useful! :claps: :D :bravo: :Thanks:
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2139
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 7 guests