ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

How do I use tasks to create custom commands?

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.

How do I use tasks to create custom commands?

Postby elmakc » Sat Oct 06, 2018 11:43 pm

Hi I have read the wiki and searched the forum already but nothing is helping so I ask here.

In my game, I have an 'introduction' room with some backstory text and when the player has read that text I would like them to type 'start' to begin the game, which teleports the player to the real starting room.

I tried setting up a general task with the restriction that they need to be located in the 'introduction' room, with the action of move player to next room.
However when I run the game and type start it says 'Sorry I didn't understand that command.'

After reading the wiki and other sources, I just don't understand what I am doing wrong here.
Please be gentle I am really new at this.
Thanks for any help.
User avatar
elmakc
 
Posts: 2
Joined: Sat Oct 06, 2018 11:28 pm
Location: Adelaide, South Australia

Re: How do I use tasks to create custom commands?

Postby P/o Prune » Sun Oct 07, 2018 5:41 am

Hi there.
Welcome to Adrift and our little corner of the vast IF universe :yeah:

I'm at work, so this is written from memory but it should be close enough to guide you.
In teh developer, on the top of the screen 8to the left I believe) you should have a pull down menu and you'll find something called introduction.
Click on that and you'll come to the intro page where you can write your intro.
Below is a box named "Start adventure location" (I believe) this is where you insert the location name of your first location an violá you're all set.

I usually put a "Press any key" <waitkey> below the intro thus allowing the player to decide when to move on to the actually game.
D-Day V.5 in progress 86Kb (Slowly drifting)
Just a Fairy Tale: 29Kb
User avatar
P/o Prune
Site Admin
 
Posts: 4244
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 58

Re: How do I use tasks to create custom commands?

Postby saabie » Sun Oct 07, 2018 5:49 am

Did you try the LOOK command after START to see if you actually moved?
The "Sorry I didn't understand that command" message may simply be because your task did not output any text at all.
ADRIFT gives that message if, at the end of a turn, nothing has been printed by any tasks.
What you need to do is add another action to display the description of the new room after you move there.
Add a new "Tasks" action:
[ Run Task ][ Look ]

If you are not being moved to the new room, then check that the "Enter any number of commands" box contains the word start on a line by itself.
saabie
 
Posts: 935
Joined: Fri Aug 12, 2011 2:07 am
Location: Adelaide, South Australia
Points: 25

Re: How do I use tasks to create custom commands?

Postby elmakc » Sun Oct 07, 2018 10:02 am

Thanks be to both of you.
I ended up going with Prune's way, I didn't know about <waitkey> it seems very handy indeed!
Though you were correct saabie, the problem before was that I had no text output in the task.
I thank you both again.

PS. saabie, great to see another Adelaidean on here, what are the chances?!
User avatar
elmakc
 
Posts: 2
Joined: Sat Oct 06, 2018 11:28 pm
Location: Adelaide, South Australia


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 6 guests