The place to discuss the ADRIFT Interactive Fiction toolkit

Intermediate: Triggering Events

This forum is the place to discuss the older ADRIFT versions 3.9 and 4.0.

Please refer to the ADRIFT 4 Manual for more information.

Postby DavidG » Thu Jul 04, 2002 2:04 am


If you look at the Edit Event dialog, on the first "Timings" tab, there are three ways to start an event:

1) Immediately, that is, at the start of the game
2) Between X and Y turns - that is, a certain number of turns since the start of the game, at a random turn number greater than or equal to X and less than or equal to Y. If you want it to start on a specific turn, make X and Y the same.
3) After a task has been completed.

Number (3) is the more interesting, and the one you would generally use to start an event when a player enters a room.

There are two techniques:

1) Create tasks on movement

You can cover all of the entrances to a room and set up tasks in the room the player is in before entering the event-room (let's call it). This is the simplest way if there is only a single entrance to the event-room.

Let's say you want to start an event in "The Treasure Room", with lies to the south of "The Throne Room". Create a task to fire when the player types any of the variant ways of going south from the Throne Room. The need to cover all the ways the player might type this movement is a bit tedious. A task like:

Code: Select all
{go/goto/move} [s/south]

...should generally cover it.

This task should of course be the one which fires the event in the Treasure Room.

By the way, I've adopted Campbell's suggestion and start all my tasks with a task "name" beginning with a #, eg the first variant is something like: "# Start Treasure Room Event". Because of the #, the player can't actually type this statement and it thus works well as a descriptive name for the task.

2) Use a hidden character

This is DuoDave's suggestion, which I think is brilliant. You put a character in the room which the player can't see. I've generally started the character name with an underscore so it's unlikely the player will accidentally type in the start of the hidden character's name.

You need to leave the character description blank, and blank out "What to show when character is in the room", and uncheck "Show characters entering/exiting the room".

Now you need to create a walk for the character, which is limited just to the event-room. The walk must loop on completion. Now you set up "If character comes across character" so that when the Player meets the hidden character, it fires the event.

While this is a monstrous :D workaround, it does work brilliantly, and I've used it several times in my current game. It's especially good for rooms with many entrances, where setting up tasks would be very tedious.

You can use it to kill the character on entering a room, or for many other purposes - any purpose for which you want an event to be started, for example. But it's not limited to starting events - it's any time you want a particular task to happen on the user entering a room.

For example, I have a snake pit, and on average about half the time the player enters the pit, a new snake is released. This happens because the player is unbeknownst meeting a hidden character, who has a walk into the event room and back to hidden, spending an equal amount of time in each. There's a system task called "# Release a new snake" which does the trick.

Edited By MileStyle on 12 Nov. 2002 at 15:04
User avatar
Posts: 44
Joined: Mon Jun 24, 2002 1:50 am
Location: Melbourne, Australia

Return to ADRIFT 3.9 and 4.0

Who is online

Users browsing this forum: No registered users and 5 guests