If and else script to finish a game

I want to put a condition by asking a player “ How Mr Smith died ?” Player will get a chance to choose option 1= murder? Option 2= Suicide?

If player chooses murdered then continue the game and if chooses Suicide then lost the game? How to write please help. New to the platform.


ShowMenu ("How Mr Smith died?", Split("murder;suicide"), false) {
  switch (result) {
    case ("murder") {
      msg ("You think he was murdered? You'd better investigate!")
    }
    case ("suicide") {
      msg ("Game over!")
      finish()
    }
  }
}

Ok thanks mrangel


Log in to post a reply.

Support

Forums