ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Is there a way to output an obj list with value filter?

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 there a way to output an obj list with value filter?

Postby DazaKiwi » Wed Apr 24, 2019 3:58 am

What i want to do is output/list all objects that has a property with its integer value = 0

The line below doesn't work of course but gives you an idea of what i want to be able to do;
%Player%.Location.Objects.Property(0).List

If this is not possible i can think of a work around using selected property type but for what i want but it would be good to know if it is possible if the property is an integer and you can somehow specify that as a filter?
User avatar
DazaKiwi
 
Posts: 619
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Is there a way to output an obj list with value filter?

Postby saabie » Thu Apr 25, 2019 1:26 am

I tried several different methods of filtering by an integer property but I couldn't even get it to list the values, the only thing that works is 'Sum'.
You will need to use another method such as sending the %Player%.Location.Objects list to an executed task %object% parameter and checking each one with a restriction.
If the property value ever changes then you will need a separate state rather than not selecting it when it should be zero.
The state must be set to 'Zero' or 'NotZero' whenever the value changes.

An easier method would be to add each object to a group whenever the property is set to 0, and remove it if set to another value.
This would be much easier to list as you only need to do "ZeroGroup.List".
saabie
 
Posts: 959
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Is there a way to output an obj list with value filter?

Postby DazaKiwi » Thu Apr 25, 2019 3:35 am

Okay thanks for the suggestions, its amazing what work arounds can make something work with Adrift.
User avatar
DazaKiwi
 
Posts: 619
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 2 guests