Fast travel

Hi, as somebody new to this I was wondering how to go about creating some sort of fast travel system and how that could look like. I figured I should ask before I spend a lot of time on something that isn't right


Each of my towns has a town center. It is where a player will go when they type "Travel (town name here) They must enter a town name, not a building or whatever.
I use this for my fast travel function. I call it in the travel command. (Thanks go to mrangel)
It will give a list of towns the player has visited.

ViewObjectScreen
msg ("<h2><center>Fast Traveling")
ShowMenu ("You have decided to fast travel to another town.<br>List of available locations you have visited:<br>", game.travel_location, true) {
  NewLocation = GetObject (result)
  if (player.parent = NewLocation) {
    msg ("You are already in  " + result + ".")
  }
  else if (NewLocation.visited = false) {
    msg ("You will need to visit there before you can fast travel there.")
  }
  else if (NewLocation.visited = true) {
    msg ("You travel to " + result + ".")
    ReturnFromViewObjectScreen
    MoveObject (player, NewLocation)
  }
  else {
    msg ("You can't travel there")
  }
}

ViewObjectScreen is another function I made. It is:

HidePanes
ClearScreen

ReturnFromViewObjectScreen is another function of mine.

ClearScreen
ShowPanes
ShowRoomDescription

You can delete them if you want.


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

Support

Forums