ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Restriction checking if an object is within a location group

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.

Restriction checking if an object is within a location group

Postby Denk » Tue Aug 06, 2019 6:09 pm

Using a restriction, I need to check if the position of a specific object is within a location group. Does anyone know if that is possible and if so how?
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: Restriction checking if an object is within a location g

Postby DazaKiwi » Tue Aug 06, 2019 8:54 pm

What do you mean by 'position' of a specific object within a location group?
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Restriction checking if an object is within a location g

Postby Denk » Tue Aug 06, 2019 9:26 pm

I guess I should have explained it better - Let's say a boat is in location 5. Then I want to check if location 5 is part of a location group. I tried something like:

'a boat' 'must' 'be within group' 'groupname'.

But because boat is an object, I only get a list of object groups, not location groups.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56

Re: Restriction checking if an object is within a location g

Postby DazaKiwi » Tue Aug 06, 2019 9:43 pm

Okay I found a way using param method and made a demo.
Attachments
LocGrpRestrictDemo_v1.taf
(15.14 KiB) Downloaded 9 times
User avatar
DazaKiwi
 
Posts: 631
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 21

Re: Restriction checking if an object is within a location g

Postby Denk » Tue Aug 06, 2019 9:51 pm

That works great - thanks!
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 258
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 56


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests