Item effect delayed until player moves

One more question (thought I’d put it in a separate thread to aid anyone searching for similar help later):

I’ve got an item that the player can drink. When they do so, it informs them what it tasted like, and that it didn’t seem to have any other effect. The problem is that I want it to “teleport” them the next time they try to move in any direction.

Here’s basically how it should behave:

Bathroom
You’re in the bathroom.

i
You are carrying:
a fizzy potion

drink potion
You drink the fizzy potion. It’s pretty good, but it didn’t seem to do anything.

look

Bathroom
You’re in the bathroom.

z
Time passes…

s
You try to go that way, but suddenly feel yourself being pulled in an altogether different direction.

Another Dimension
You’re in another dimension.

Thanks in advance. =)

Hmm… In I7? Try this:

The player can be pending teleportation.

Carry out drinking the potion: now the player is pending teleportation.

Instead of going when the player is pending teleportation: now the player is in Alternate Dimension. “You try to go that way…”

Here is a simple way to do it. First, you could create a property on the player, and set it to something like ‘true’ when they drink the potion; then, make a rule so that every time the player moves, the game checks if the property is true. If it is, they are teleported, and the game changes the property back to something like ‘false’ (so this doesn’t happen twice when the player moves again). See chapter 8 for properties, and chapter 7 for basic actions (for Instead and Before rules).


"Theodore the Thaumaturge's Tonic of Teleportation"

The Bathroom is a room. "The apartment is through the door south.". The fizzy potion is a thing in the bathroom. The Apartment is south of the bathroom. "The bathroom is north.".

Another dimension is a room.

A person can be fizzed or flat. A person usually is flat.

Instead of drinking the fizzy potion: say "Burp!"; remove the fizzy potion from play; now the player is fizzed.

The teleportation rule is listed first in the carry out going rules. This is the teleportation rule: if the player is fizzed begin; now the player is in another dimension; now the player is flat; say "Whoa! Strong stuff."; ignore the carry out looking rules; end if.

test me with "south / north/ drink potion / south"

You also could forget about listing the teleportation rule in the carry out going rules, and just put everything in an Instead or Before (I think).

edit: now that I’ve read it, I think I like ralph’s idea better :slight_smile:

Thank you both for the quick responses! I think I’ll go with Ralph’s idea, but I’m using fizzy and flat as the variable because it’s just funny. Even though nobody will see it. :wink: