Page 1 of 1

How do I use tasks to create custom commands?

PostPosted: Sat Oct 06, 2018 11:43 pm
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.

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

PostPosted: Sun Oct 07, 2018 5:41 am
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.

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

PostPosted: Sun Oct 07, 2018 5:49 am
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.

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

PostPosted: Sun Oct 07, 2018 10:02 am
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?!