I'm not sure how to layer this code?

It's my new project, or game, again.

I'm not sure how to order the code. Do I need the wait?

Game here. http://textadventures.co.uk/games/view/yxlhx2owy0_5gcwaxle0ag/pokemon-play-as-young-harley-version

When you start the game, go West, then Southwest, then South.

Or, just look at the code... Well, I guess I can post it...

Here.

LockExit (ac)
LockExit (ab)
MoveObject (Boy 1, Road)
MoveObject (Girl 1, Road)
MoveObject (Boy 2, Road)
msg ("Harley's classmates show up. There is a boy, named Carl, a girl named Diana, and a boy named Shaun.<br/><br/>One of the popular girls says \"Well, well... If it isn't little Harley? Are you playing with your Cacnea?\"<br/><br/>Harley tries not to let her get to him, but his anger shows in his speech. \"I'm a Pokémon trainer!\"<br/><br/>The girl says \"Tch, you couldn't even beat one gym!\"<br/><br/>Your anger increases. \"I will defeat the Pokémon League and become Pokémon Champion! You'll see!\"<br/><br/>What do you do?<br/>{command:say nothing}<br/>{command:insult}")
msg ("(Press a key.)")
wait {
  msg ("Cleared.<br/>You can go north or east.")
  turn on descriptions
  UnlockExit (ab)
  UnlockExit (ac)
}
msg ("Would you like some {command:help}")
options = Split("Say Nothing;Insult;", ";")
ShowMenu ("What will you do?", options, false) {
  switch (result) {
    case ("Say Nothing") {
      msg ("\"...\"<br/>+ 1 Emotional Stability")
      player.score = player.score + 1
    }
    case ("Insult") {
      msg (" Your rage increases. \"And you won't be a champion, you nitwit!\"<br/>- 1 Emotional Stability")
      player.score = player.score - 1
    }
  }
}

the code looks fine for the most part...

  1. the 'msg ("Press a key")' code line isn't really needed... as the 'wait' Script/Function creates the blue 'continue' hyperlink, which is obvious to click on to continue (or just pressing any keyboard key, does the same thing as well)

  2. not sure if the 'turn on descriptions' is a working code line (such as a Function call) or not: if not, obviously put in a working code line(s) to do this 'turn on descriptions' that you want to be done, but I'm sure you're already aware of this of course.

  3. you may want/need to put the menu block inside of the 'wait' block, to be safe, as it may run/fire/execute, while the 'wait' block scripting waits for key press or mouse click on the blue 'continue' hyperlink:

LockExit (ac)
LockExit (ab)
MoveObject (Boy 1, Road)
MoveObject (Girl 1, Road)
MoveObject (Boy 2, Road)
msg ("Harley's classmates show up. There is a boy, named Carl, a girl named Diana, and a boy named Shaun.<br/><br/>One of the popular girls says \"Well, well... If it isn't little Harley? Are you playing with your Cacnea?\"<br/><br/>Harley tries not to let her get to him, but his anger shows in his speech. \"I'm a Pokémon trainer!\"<br/><br/>The girl says \"Tch, you couldn't even beat one gym!\"<br/><br/>Your anger increases. \"I will defeat the Pokémon League and become Pokémon Champion! You'll see!\"<br/><br/>What do you do?<br/>{command:say nothing}<br/>{command:insult}")
msg ("(Press a key.)")
wait {
  msg ("Cleared.<br/>You can go north or east.")
  turn on descriptions
  UnlockExit (ab)
  UnlockExit (ac)
  msg ("Would you like some {command:help}")
  options = Split("Say Nothing;Insult;", ";")
  ShowMenu ("What will you do?", options, false) {
    switch (result) {
      case ("Say Nothing") {
        msg ("\"...\"<br/>+ 1 Emotional Stability")
        player.score = player.score + 1
      }
      case ("Insult") {
        msg (" Your rage increases. \"And you won't be a champion, you nitwit!\"<br/>- 1 Emotional Stability")
        player.score = player.score - 1
      }
    }
  }
}

Thanks. I'll try my best.


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

Support

Forums