Inform 7 Teleportation?

I have been trying to create a Teleportation code for inform 7 but can’t. Can someone help?

The command would go something like this.

Go to [place].

This might be a start:

Teleporting is an action applying to one visible thing. Understand "go to [any room]" as teleporting. Carry out teleporting: move the player to the noun.

You’ll obviously want to add some conditions, and probably some text to explain that you’re teleporting; also the spacing is a bit goofed up when I test this. Also if you put in something that’s not the name of the room you get an annoying “That noun did not make sense in that context.” But it does what you basically want, I think.

The key thing is the [any room] token, which allows the player to input the name of any room – if you don’t use that token, you’ll get “You can’t see any such thing” when you try to teleport.

Thanks! It worked great. I dont need to add any text btw because its not for the release but It works great for getting around in the unpublished work. THANK YOU! :smiley:

GONEAR name_of_room also works for getting around, doesn’t get compiled in a live game and doesn’t require that you write any code.

3 Likes

Thanks for this it helped me a lot too!

Rob

hi
a new bee here. i have also tried teleporting and as game compiles i get ingame error “That’s not a verb I recognise.” is it perhaps a linux bug or is there something i’m missing?

regards

1 Like

What does your code look like?

1 Like

Definitively NOT a Linux bug. I have successfully coded teleportation in my I7 (now 10) messing/fooling arena, and I use Linux since 1995 or so…

Best regards from Italy,
dott. Piergiorgio.

3 Likes

GONEAR is a testing command that should work in the IDE and “release for testing” compiles, but won’t work when you publish the game.

GONEAR FOYER
GONEAR TREASURE CHEST
should work…

Another handy one is PURLOIN which lets you steal any object into inventory no matter where it is.

PURLOIN FABULOUS IDOL

1 Like

hi
i basicly copied matts line this is full test story :slight_smile: partly in slovene :slight_smile:

Stanovanje is region.
Hodnik is room. Hodnik is in Stanovanje. "Hodnik je rahlo rumene barve.".
Kuhinja is room. Kuhinja is in Stanovanje. Kuhinja is northwest of Hodnik. "Vse je totalno belo.".

sosed is room. "konec.".
teleporting is an action applying to one visible thing. Understand "go to [any room]" as teleporting. Carry out teleporting in Kuhinja: move the player to the sosed.

in game i tried saying as teleport or teleporting.

1 Like

I don’t get your error message with your sample code.

Hodnik
Hodnik je rahlo rumene barve.

>go to kuhinja
>

>nw

Kuhinja
Vse je totalno belo.

>go to sosed
sosed
konec.

However, the teleporting action as written only works in Kuhinja, so typing GO TO KUHINJA when at the starting location Hodnik, as I did above, won’t do anything at all.

Also, your code doesn’t use the noun given in the command, so typing GO TO HODNIK or GO TO KUHINJA when in Kuhinja will still move the player to the sosed.

A more sensible carry out rule might be something like the one in matt w’s reply above:
Carry out teleporting: move the player to the noun.

If you would rather implement the actual verb TELEPORT as a single-word command, you would write something like this:
teleporting is an action applying to nothing. Understand "teleport" as teleporting.

2 Likes

Thank you now i understand :slight_smile:

2 Likes