Text Timing

● ARCHIVED · READ-ONLY
Started by Nic3Ntertainment 7 posts View original ↗
  1. Sorry for asking such a duncey question, but I've stuck myself.  Is there any way I can set a text box to end and move on to the next event action after a desired amount of time?

    I'm trying to create an opening, but if you read slower than I do...the timing will be all off on a parallax picture moving in the background.

    Barring that, is there anyway I can make a parallax background move for a certain period before stopping and holding in place?

    I'm using VX Ace, the only script I have operating is Galv's message busts (which isn't being utilized in the text I'm working with).

    I've included a screenshot of what I'm working with right now.  This is my base event and it's not doing what I need.  The wait won't activate until somebody hits a button after the text box, but if I put the wait before the text...it won't activate.  And either way it does nothing until somebody smacks a button.  The second parallax change is just the first parallax, but with less 'left' space so that it sits where the first parallax would be when the first text box ends.

    Thanks for any help, I've spent the last hour between trying to fiddle with it and looking here for answers.  Sorry if it's been asked, I couldn't find a thread dealing with my issue.  Link me if it exists and I'll be placated. :)

    Thanks.

    ~Rich

    Screen1.png
  2. Hmm, well, you could use a script command to open the message window and display text, which would allow you to bypass the typical message wait while still allowing the player to close the window by themselves (C button).

    message-skip.png
    The first snippet of code is actually put into the 'Script' section of a Move Route. The target is unimportant, I simply use Move Route because the script field can hold an enormous amount of text and does not accidentally break up script when spanning multiple lines. Using the following code to add a message bypasses the normal wait typically encountered with other options. The event moves on to the next task after displaying the message, which is the wait. The downside to this option is that it is not very pretty, and a little difficult to do editing. You will have to use '\n' for new lines, as the script field in Move Route does not allow returns.

    $game_message.add(%Q("I'll hold a grand tournament and convince that\nchild, Xian, to put up his throne as the ultimate\nprize! To the winner goes the Imperial Crown, and\nthey'll kill each other trying to claim it!"))The next portion of code will close the window, clear out settings and text to allow the following messages to appear afterward.

    Code:
    # Grabs the 'message window' objectmessage_window = SceneManager.scene.instance_variable_get(:@message_window)# Closes and clears settings in the 'message window'message_window.send :close_and_waitmessage_window.send :clear_instance_variables# Clears the previous text$game_message.send :clear
  3. You can do it without scripting. Hover your mouse over the text input window for a bit, and you'll see a popup showing the commands you can use in text boxes.


    You'll see that the escape code \| can be used to pause text and \^ says to not wait for input after displaying the text. So if you want your text to appear and then wait 5 seconds and have the window close automatically, you might try putting something like this at the end of the text: \|\|\|\|\|\^


    What I'm not sure about is if you can FORCE it to do that - by default the player can press the space bar or enter key to display all the text at once. But it's worth a try.
  4. You can use the message script option as above along with the following code :

    # Make the game wait until the parallax has scrolled 10 pixels.# If you are scrolling horizontally, replace @parallax_y with @parallax_xwhile $game_map.instance_variable_get:)@parallax_y) <= 10 1.times { Fiber.yield }end# Change the scroll speed to zero, stopping the parallax at 10 pixels# If you are scrolling horizontally, replace @parallax_sy with @parallax_sx$game_map.instance_variable_set:)@parallax_sy, 0)# Wait until the player has closed the previous message windowFiber.yield while $game_message.busy?EDIT: The option Shaz laid out does work. Just depends on what effect you want, really.
  5. It's generally recommended to NOT use scripts unless you HAVE to - due to their complexity, incompatibilities, and just getting to know the event commands better.
  6. Aha, \^. That did it.  Thanks, Shaz.  I'd been trying a combination of \> and \|.  I must have passed over \^ a dozen times.

    Although I didn't go with your style (all it did was crash the game when the event started), Exhydra, thank you for the response.

    Thank you both, I got what I needed.
  7. If it crashed the game, you must have some script errors.


    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.