Page 1 of 1

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

PostPosted: Wed Apr 24, 2019 3:58 am
by DazaKiwi
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?

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

PostPosted: Thu Apr 25, 2019 1:26 am
by saabie
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".

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

PostPosted: Thu Apr 25, 2019 3:35 am
by DazaKiwi
Okay thanks for the suggestions, its amazing what work arounds can make something work with Adrift.