Transition between moving from one room to another

There is a part in my game where when you move from one location to another there is a delay as 'your eyes get accustomed to the change in light' so I have a script on the exit that displays this message, waits a few seconds then moves the player to the new room.

This works fine, except I know that some impatient player will type a command during this delay and realise they haven't moved location yet.

If I do move them then show the message then it won't make sense as the room description will be printed to screen as soon as they are moved.

Sure there is an obvious solution to this that I'm not seeing!


J_J

You could move the player to a room called darkness. "You are in darkness." When the player looks you could have the description. "Your eyes are still adjusting, it's too dark to see." Then move them to the proper room once their eyes have adjusted/the time has passed. (If it's because the light is too bright call it bright room instead :p)


I'd make the room dark and have it's dark description be the "you can't see anything until your eyes adjust" message. Then have its "before enter" script do something like:

  SetTimeout (5) {
    if (Contains (cellar, game.pov)) {
      msg ("Your eyes have adjusted to the darkness, so you can see now.")
      cellar.dark = false
      ShowRoomDescription()
    }
  }

Keeping the player in the previous room seems more trouble than it's worth. If you want to stop the room's description from showing, either make the room dark or set game.showdescriptiononenter to false temporarily while you move them.

(The darkness option seems better to me, as it will redisplay the message about needing to let your eyes adjust if the player types "LOOK")


unfortunately, they're constantly posting on this forum... sighs...

(be very wary, some seem to be normal/appropriate-code-quest posts too)


Thanks all, I hadn't thought of using darkness in that way, very neat.

ND


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums