ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Moving PC either holding or wearing 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.

Moving PC either holding or wearing object?

Postby P/o Prune » Sun Aug 04, 2019 1:43 pm

How do I easiest go about having my character move from one location to another with an object that can either be worn or held, but he must have it in his position in order to leave the present location?

I have created a task with the following restrictions.

Player must be at location living room
Player must be wearing a shirt
Player must be wearing pants
player must be wearing compass
OR
Player must be at location living room
Player must be wearing a shirt
Player must be wearing pants
player must be holding compass

It works this way but it is very cumbersome to have to write all this.
Any suggestions?
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 58Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4372
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: Moving PC either holding or wearing object?

Postby Lazzah » Sun Aug 04, 2019 3:47 pm

Use:

(Player must be holding Compass OR
Player must be wearing Compass)

as the last two restrictions.
W.I.P.: Magnetic Moon, Starship Quest & Revenge of the Space Pirates.
Also available: The Axe of Kolt - The Spectre of Castle Coris - The Fortress of Fear - Die Feuerfaust - The Lost Children - Run, Bronwynn, Run!"
User avatar
Lazzah
Moderator
 
Posts: 2200
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17

Re: Moving PC either holding or wearing object?

Postby P/o Prune » Mon Aug 05, 2019 8:06 am

Lazzah wrote:Use:

(Player must be holding Compass OR
Player must be wearing Compass)

as the last two restrictions.

Thanks... Makes sense 8)
I thought that when you used "OR" everything before that was ignored.
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 58Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4372
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: Moving PC either holding or wearing object?

Postby reelyor » Wed Aug 07, 2019 10:34 am

If you list multiple "and"s and then use an "or" with the last 2, all of the "and"s will be first tested and then the "or" will finish it off.
"Live well, Love much, Laugh often"

Working on: "Deperate Isle" and "Niki - An Adult Graphic Adventure"

reelyor@msn.com
Roy
User avatar
reelyor
 
Posts: 496
Joined: Sun Dec 21, 2003 5:40 pm
Location: Massachusetts, USA
Points: 10

Re: Moving PC either holding or wearing object?

Postby saabie » Wed Aug 07, 2019 1:25 pm

The brackets around the two ORed restrictions cause the OR to be evaluated before the result is ANDed with the other restrictions.
See WIKI page on restriction lists
saabie
 
Posts: 964
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: Moving PC either holding or wearing object?

Postby reelyor » Wed Aug 07, 2019 1:28 pm

Thanks - I stand corrected.
"Live well, Love much, Laugh often"

Working on: "Deperate Isle" and "Niki - An Adult Graphic Adventure"

reelyor@msn.com
Roy
User avatar
reelyor
 
Posts: 496
Joined: Sun Dec 21, 2003 5:40 pm
Location: Massachusetts, USA
Points: 10


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest