ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Player movement

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.

Player movement

Postby P/o Prune » Mon Feb 10, 2020 11:37 am

Is there a way to create a special task (player moment) using two different directions?

My PC is inside a house. s/he can leave the house either by moving north, or by going out.
I want to create ONE specific task that covers both possibilities, but is that possible?
D-Day in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 97kb
User avatar
P/o Prune
Site Admin
 
Posts: 4562
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 93

Re: Player movement

Postby Denk » Mon Feb 10, 2020 1:25 pm

P/o Prune wrote:Is there a way to create a special task (player moment) using two different directions?

My PC is inside a house. s/he can leave the house either by moving north, or by going out.
I want to create ONE specific task that covers both possibilities, but is that possible?
Sure, that is possible.

You must create a specific task which overrides the general task "Player Movement".
(If you want something to happen but you still want to move in the specified directions, you can use "run before" or "run after" instead of "override")

Then you must leave "direction" undefined in the field that says "go to the direction", i.e. do not choose a direction.

Instead, you must specify the valid directions in the restrictions.

Create these two restrictions:
adrift Code: Select all
Referenced Direction must be North
Referenced Direction must be Out


You must change "AND" to "OR" between these two tasks.

You will most likely need more restrictions, e.g. specify in which room this task applies. Thus you need to put a set of parantheses around the above mentioned restriction pair.

I attach an example (in the example the directions are North and East but the method is the same):
SpecificTaskForTwoDirections.taf
(15.32 KiB) Downloaded 43 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Denk
 
Posts: 401
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 226


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 1 guest