Tell a cab driver destination not on drop-down

Hourglass1
17 Apr 2018, 15:58

I need to have a Player solve a puzzle that gives them a destination to tell a cab driver. Then the driver asked "Where to? " and they type a response. Then the driver takes them there and the exit to the new location.

I can seem to find a tutorial... And I'm not a programmer so I'm a bit lost. Any suggestions?


hegemonkhan
17 Apr 2018, 17:07

run as script -> add new script -> 'output' section -> 'get input' Script

your typed-in input is stored into the 'result' Variable VARIABLE, which you can then use within your scripting

example scripting:

msg ("Where to?")
get input {
  // the 'get input' automatically (hidden from you) stores your typed-in input into the 'result' Variable VARIABLE:
  // result = "YOUR_TYPED_IN_INPUT"
  if (result = "CORRECT_DESTINATION") {
    player.parent = CORRECT_DESTINATION
    msg ("The cab driver takes you to the CORRECT_DESTINATION")
  } else {
    msg ("wrong input destination, try again")
  }
}

DarkLizerd
18 Apr 2018, 03:11

Then, a "move player" to put the player at that location...
But, if you add several possible locations then have the cabby take them there, even if it is the wrong address...