How to make script run sequence? [SOLVED]

Hello i am new here

First i turn off the command bar by default because my game doesnt need too much input

I put script after entering room for the first time

  1. Clear the screen (work normally)
  2. Print message : This your story... tell us your name (work normally)
  3. Show the command bar (using request (show, "command")) work normally and command bar appear
  4. Print output player name (it work)
  5. When i put script hide command bar, its like the script run at the same time because script number 3 and 4 doesnt appear

Any idea how to solve that number 5 ? thanks

Another question is when i put that script why Object list, exit list and description room not appear? thank you once again

Note : I want to upload image in here but i have no idea how to that tho


when i put that script why Object list, exit list and description room not appear?

After entering the room, the room description and everything prints, then you clear the screen -- hence deleting the room description, object list, and exits list.

The "Before entering" script may work better for you.


When i put script hide command bar, its like the script run at the same time because script number 3 and 4 doesnt appear

Does your code look similar to this:

ClearScreen
msg ("This is your story... Tell us your name.")
JS.uiShow("#txtCommandDiv")
get input {
  player.entered_name = result
  msg ("Welcome, {player.entered_name}!")
  JS.uiHide ("#txtCommandDiv")
}

Make sure the line of code that hides the command bar is inside of the get input code block.


@Richard

"After entering the room, the room description and everything prints, then you clear the screen -- hence deleting the room description, object list, and exits list.

The "Before entering" script may work better for you."

==== Thanks, the room description and everything execute first then clear screen thats why everything is gone, it work like you said

"Make sure the line of code that hides the command bar is inside of the get input code block."

==== Thanks once again, yeah my code outside get input and changing to inside of get input make work like i expected.


Hurray!

Happy gaming!


Thanks, your help is really great, i hope you will help me again in the future :D

PROBLEM SOLVED


Log in to post a reply.

Support

Forums