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.
Post Reply
User avatar
elmakc
Posts: 2
Joined: Sun Oct 07, 2018 12:28 am
Points: 10
Location: Adelaide, South Australia

How do I use tasks to create custom commands?

Post by elmakc »

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
P/o Prune
Site Admin
Posts: 4739
Joined: Mon Jun 24, 2002 9:18 am
Points: 93
Location: Denmark

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

Post by P/o Prune »

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 in progress 86Kb (Slowly drifting)
October 31st: 60Kb (possible entry for IFComp 2021 :wink: )
saabie
Posts: 1024
Joined: Fri Aug 12, 2011 3:07 am
Points: 50
Location: Adelaide, South Australia

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

Post by saabie »

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.
User avatar
elmakc
Posts: 2
Joined: Sun Oct 07, 2018 12:28 am
Points: 10
Location: Adelaide, South Australia

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

Post by elmakc »

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?!
Post Reply