ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Object and Location as one

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.

Object and Location as one

Postby ZyriBlackwood » Thu Jan 02, 2020 1:37 am

for an example im gonna use a car for this. How would i go about making this car interactable as an object and also allow me to let the player .. enter the car for them to be in the car as a location?
ZyriBlackwood
 
Posts: 8
Joined: Thu Jan 02, 2020 1:31 am

Re: Object and Location as one

Postby Lazzah » Thu Jan 02, 2020 5:13 pm

Hi Zyri,

Welcome to the world of ADRIFT, we hope your stay will be a good one.

This can be done using a couple of locations, a location group, two static objects and four tasks, two general and two specific. I have created a short demo as attached which shows you how to do this without going into a lengthy explanation.

If there is anything about the demo that you do not understand, please ask.

Car Demo.taf
(15.39 KiB) Downloaded 37 times
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2329
Joined: Thu Mar 31, 2011 4:54 am
Location: Dagenham, Essex
Points: 65

Re: Object and Location as one

Postby ZyriBlackwood » Fri Jan 03, 2020 9:22 am

Ok wow that was fast, and also double wow, that was way more simple than what I had, but also i wanted to know about the "General Tasks"

[get/move/go] [out] {of} {a/the/my} [car]
[exit] {a/the/my} [car]
[leave] {a/the/my} [car]

i understand / means or, but [] mean? and what of {} ? and the order is important too obviously as i see and also must be parted with space and not ,.

same with Get in car

[move/go/get] [in{to/side}] {a/the/my} [car]
[enter] {a/the/my} [car]

I've noticed the [ and { are in the same area. what exactly does this mean?

also what if i attempt this command elsewhere that's not in the car? say the kitchen?


what happens then?

Also thank you so much for this demo. and taking your time to do this for me this is absolutely wonderful.
ZyriBlackwood
 
Posts: 8
Joined: Thu Jan 02, 2020 1:31 am

Re: Object and Location as one

Postby ZyriBlackwood » Fri Jan 03, 2020 9:24 am

Oh also thank you so much for the welcome! and a further question what exactly is the purpose of the location group?
ZyriBlackwood
 
Posts: 8
Joined: Thu Jan 02, 2020 1:31 am

Re: Object and Location as one

Postby saabie » Sat Jan 04, 2020 4:03 am

Square brackets don't do anything if there isn't a / inside it, so these commands can be written as:
[get/move/go] out {of} {a/the/my} car
exit {a/the/my} car
leave {a/the/my} car
[move/go/get] in{to/side} {a/the/my} car
enter {a/the/my} car

The brackets group a set of options, so [move/go/get] means that one of these three words must be entered by the player at this point in the command.
Braces mean that it is optional, so {a/the/my} means that the the player can enter any of the 3 words, but they don't have to enter anything here.
in{to/side} means that the player can enter any of the words "in", "into" or "inside".
Brackets can also be nested inside each other, so
[enter/move in{to/side}] car
would let the player enter any of:
enter car
move in car
move into car
move inside car

To prevent the player from getting into the car when they are in the kitchen, there would need to be a restriction (on the restrictions page of the task) that prints a message like "You can't see the car" if you try to do this.
ADRIFT will automatically add some of these basic restrictions when you create a task, but you can add more if you need them.
For example you could add a restriction that prevented the player entering the car if the door is locked.

There are three main uses of a location group:
It allows a large static object such as a river or a forest to be in several locations at once.
A door between two locations needs to be in both locations at once, so that when it is opened or closed it is the same when seen from either location.
A location group lets you move the player or another character to a random location within the group.
saabie
 
Posts: 1023
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 50

Re: Object and Location as one

Postby ZyriBlackwood » Sun Jan 05, 2020 9:52 am

saabie wrote: door between two locations needs to be in both locations at once, so that when it is opened or closed it is the same when seen from either location.
A location group lets you move the player or another character to a random location within the group.



Wow dope! That answeres a few other questions i had.. Thank you! also the Knowlage you have given me before! Thank you so much!
ZyriBlackwood
 
Posts: 8
Joined: Thu Jan 02, 2020 1:31 am


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 3 guests

cron