isolating unique traveling verbs to particular rooms

smappdi
27 Nov 2010, 04:50
Hello,

I have a room in the game I'm working on that is actually a lake, so I want traveling verbs that make more sense contextually. For example, instead of "go west," I want players to use "swim west." So I made a new verb "swim," and made it synonymous with "go." It works fine, but I want the use of "swim" to be isolated to the lake room only. It wouldn't make sense in the other rooms without any water for the player to still be able to "swim" around. Is there any way to do this?

Other questions:

- Let's say I want players in the lake room to be able to "swim" when moving laterally (west, south, etc.), but in order to go to the room "underwater" (down), have to specifically type "dive." Is it possible limit different moving verbs to particular directions? I'd also need to be able to print special messages if a player tries to use the wrong verb with a direction (ex. "The current is too strong, you need to dive instead," or if they're not in the lake, "You can't swim on land, try finding some water.")

- Can I completely disable non-contextual verbs in a particular room? Such as with the lake room, can I disable "go" entirely for this room only, forcing players to type "swim," "dive," etc. instead, while retaining the use of "go" in other rooms?

Thanks!
- Jeremy

Pertex
27 Nov 2010, 16:37
There are several ways to do this. One is to parse the players input with the advanced script command "Before each turn" in the Game/Advanced.menu. All rooms where the player must swim get a property "water". This property and the usercommand can be checked before each turn. Its a bit tricky and it seems to me, that Quest4 does not work properly.

Another way is to use no exits with waterrooms. Use the "Edit Custom Player Commands..." in the Advanced-menu of each room to create a swim #to#-command for this room. With skripts you can parse the direction and move the player to the next room. Look at the attached test2.asl