ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Any character restriction...?

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.

Any character restriction...?

Postby DazaKiwi » Wed Feb 14, 2018 9:29 pm

in Restrictions I'm trying to loosely define circumstances without being expressively specific. I want to check if an NPC has a property selected and is visible to player. I thought that this was done via;

(Any character must have property X
Any Character must be visible to Player)

Including the brackets so those two conditions will be entwined as it were. So like that character who does have property X is also visible to player.
But it doesn't seem to work or is not meant to?, the NPC in question i placed in another location to test this and it still passes. There are no other characters where the player currently is.

So how do you do this? is there another way i haven't thought of?

*update*
Figured out i can do it with an expression: %Player%.Location.Characters.PropertyKey.Count >= 1

But still would like to do know answer to my question above about using 'Any character' it would be cool if you could use it like i indicated above much quicker method if it did work.
User avatar
DazaKiwi
 
Posts: 524
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Any character restriction...?

Postby ralphmerridew » Wed Feb 14, 2018 11:10 pm

It would probably require massively changing the internals of ADRIFT to have things work that way. ADRIFT decides each restriction independently.
Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier
User avatar
ralphmerridew
 
Posts: 2533
Joined: Fri Dec 13, 2002 11:56 pm
Location: Missouri
Points: 10

Re: Any character restriction...?

Postby DazaKiwi » Wed Feb 14, 2018 11:39 pm

ralphmerridew wrote:It would probably require massively changing the internals of ADRIFT to have things work that way. ADRIFT decides each restriction independently.


Ok thanks for clearing that up. The ( ) brackets are for grouping restrictions? like it can be used to allow one pass in that grouping to count as a pass? not sure if i worded that well?
User avatar
DazaKiwi
 
Posts: 524
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 16

Re: Any character restriction...?

Postby saabie » Thu Feb 15, 2018 12:00 am

The item functions are the quickest way to filter a group by properties.
If you need to do anything more complex then have the task execute a second task with an action and pass the group to it.
The second task is executed for each item, so it will run for each item that passes its restrictions.

The brackets in restriction lists are used to control the order in which the restriction results are ANDed or ORed together, eg:
[The Player Character] must be Alone OR
( Dobbie must be in conversation with [The Player Character] AND
Dobbie must be alone with [The Player Character] )

In this example if the player character is alone then the two restrictions inside the brackets are ignored because the OR means that either the first restriction or the contents of the brackets need to pass, not both.
If the player is not alone then the second restriction AND the third restriction must both pass.
saabie
 
Posts: 888
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 10

Re: Any character restriction...?

Postby DazaKiwi » Thu Feb 15, 2018 8:09 pm

Thanks saabie for your reply.
User avatar
DazaKiwi
 
Posts: 524
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 6 guests