ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Location of an 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.

Location of an object

Postby Deesjebeesje » Wed Mar 14, 2018 7:29 am

Hi, I'm pretty new to Adrift and its concepts, so I'm trying to start very simple.
I want to create a simple room escape game with a room (obviously), a few items (a couch, a cabinet with some drawers and a tv on it, etc.).

1. I also created some keys and one of them has to be hidden under a pillow on the couch. How am I supposed to do that?
2. And how do I create it that when I use a key (a different one) on the door, it opens and it ends the game?
Deesjebeesje
 
Posts: 2
Joined: Wed Mar 14, 2018 7:19 am
Points: 10

Re: Location of an object

Postby ElliotM » Wed Mar 14, 2018 5:07 pm

Welcome, hope you have fun with Adrift. Your idea to start small is good but even a small game can cover a lot of ground. I've described some of the important concepts I think you'll need for your game below but feel free to come back with questions. It is possible to upload sample files in your forum post, so if you get stuck you can share a copy of your demo/small game for others to help trouble shoot it. I can also create demo's if looking at a game file is more intuitive for you.

Object Types
  • There are two kinds of objects in Adrift: Static and Dynamic. Static objects won't move but Dynamic objects can be picked up and become part of the player's inventory. I would suggest that all the furniture be static objects and your keys and other puzzley items be dynamic objects.

Supporter Objects
  • To place things on top of an object, such as a table, cabinet, or shelf, it must be a supporter; In the property tab there will be a checkbox for this. Checking this will add some new check boxes that may be relevant if you are making chairs or couches that will allow characters to be on them.

Container Objects
  • To place things inside an object, such as a drawer, safe, refrigerator, or box, then it must be a container; In the property tab there will be a check box for this as well. The new check boxes it adds are only important if it is also big enough to go inside.
  • For things that can be opened, closed, or locked, there is a check box for that as well in the property tab. This is were you can tell the game which object acts as a key for what, but it will only appear if the Object can be locked check box is checked. The Key for Lock property it adds is of type object. If you haven't made your key yet it won't show up in the object list for it, so you may need to do that first.

'Electronic' or 'Active' Objects
  • For things that can be turned on or off, there is another check box in the property tab. This will allow you to keep track of its 'state', whether it is on or off, and then make restrictions based on it or alter descriptions. For example, if the TV is on it should be showing something or a bunch of static, but when it is off is shouldn't be described as if it is on, etc.

Ending the Game
  • Ending the game with an action can be accomplished with a custom task. There are three types of actions in the game. If opening a particular object is the trigger you want to end the game make a task of type specific (the green icon) and have it run after the open object task. Click on the blue line corresponding to the game winning object that must be opened and then in the actions use something from the end game tab.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Location of an object

Postby ElliotM » Wed Mar 14, 2018 5:10 pm

Hiding things can be done a few different ways. For containers that can be closed the player can't see them but Adrift doesn't have an 'Under' by default. While you could make one, you can also 'hide' objects by leaving them in the 'Hidden' room which is a special location for things that are 'not in play' and moving them to the player once they have done the right action to 'find' them. The green specific tasks or the red general tasks will help you make such actions.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Location of an object

Postby ElliotM » Wed Mar 14, 2018 5:49 pm

Furniture Demo.taf
(15.88 KiB) Downloaded 31 times


I made a mockup of some the things you mentioned to illustrate what I was talking about. For the cabinet I made a simple and a realistic cabinet. Mess around with both of them to see which feels better to you. Making a separate drawer object makes things a bit more complicated versus the simple cabinet that can be opened, closed, or locked on its own. I didn't model the TV as that is a bit more complicated. I also made a door, which most games don't do, as the game winning condition. It is unlocked by the house key which I hid in the room.
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: Location of an object

Postby Deesjebeesje » Thu Mar 15, 2018 2:17 pm

Thanks for your replies. Unfortunately, I still can't figure out how to reveal the key by picking up the pillow. I have attached the file.
Attachments
escape the room.taf
(16.83 KiB) Downloaded 26 times
Deesjebeesje
 
Posts: 2
Joined: Wed Mar 14, 2018 7:19 am
Points: 10

Re: Location of an object

Postby P/o Prune » Thu Mar 15, 2018 2:44 pm

I haven't read your taf but assuming that the pillow is on a bed, you could create a task:

Command: [get/take/pick up] {the} [pillow]

Action: Move object "Key" onto object bed
Move object "pillow" to be held by player

Message to display: lifting the pillow form the bed reveals a key (or whatever you want)

This is the way I would do it. I'm sure there are other ways, but try this.
Attachments
key.taf
(16.88 KiB) Downloaded 32 times
D-Day V.5 in progress 86Kb (On backburner)
Anno 1700 Submitted to the 2018 IFComp.
User avatar
P/o Prune
Site Admin
 
Posts: 4187
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 23

Re: Location of an object

Postby Lazzah » Thu Mar 15, 2018 3:38 pm

Deesjebeesje wrote:Thanks for your replies. Unfortunately, I still can't figure out how to reveal the key by picking up the pillow. I have attached the file.

Hi there,

I looked at your file and saw the error immediately - the pillow is on the bed so you must reference the general task TAKE OBJECT FROM OBJECT and not the TAKE OBJECT FROM LOCATION task. You must get used to adding restrictions to your Specific tasks, as I have added to the GET PILLOW task. You should create a variable which is set in the actions tab and can be used to display a better response when the player tries the command again.

You should also consider that anyone playing your game might use a different command to find the key, such as LOOK UNDER PILLOW or LIFT PILLOW. For those commands you will need to create a new general task for each action, as in LOOK UNDER object and LIFT object, as shown.

Note that I have added two underline characters to the LOOK task in the "Look and Examine" folder. This will ensure that it is at the top of the list of tasks. I find this a useful trick as the LOOK task is one you will use an awful lot when creating games.
Attachments
escape the room1.taf
(17.25 KiB) Downloaded 20 times
OUT NOW: Run, Bronwynn, Run!
Current W.I.P.: Magnetic Moon
Also available: The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust - The Fist of Fire and The Lost Children
User avatar
Lazzah
Moderator
 
Posts: 2121
Joined: Thu Mar 31, 2011 4:54 am
Location: London, England
Points: 17


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 7 guests