How to pause the processing of an event from js plugin?

● ARCHIVED · READ-ONLY
Started by lambzor 11 posts View original ↗
  1. How can you pause or delay the processing of an event until a script is complete?

    example:

    someFunction(arg)
    Common Event: Check party lead Image

    How to delay the execution of the Common Event until someFunction() has completed?
  2. You don't, because messing with the game loop is a very bad idea.
    And usually you don't have to do something like this.

    Please tell us what you want to achieve (ingame terms) instead of how you want to achieve it (stopping the game loop), then someone might be able to tell you how to do that correctly.
  3. This is for a plugin that imports dialogue and its associated parts. I am trying to make it so the dialogue has to be complete before the next event can fire.
  4. That does not explain anything. There is absolutely no need to time loading here, and even if there were it would be much easier to make the plugin triggered by script command instead of being automatic.
  5. So when you speak to a character in game the dialogue function runs and the player can click through it as should. However, in the mean time the character sprite you were speaking with is already walking away from you because its not waiting for the player to finish clicking through the dialogue, its just executing the following events immediately. What I am trying to do is make it so those events following the dialogue can not execute until the dialogue is complete.
  6. How are you moving the events?
    An events autonomous movement should automatically be stopped when the content is processed...

    Can you give a screenshot of the event page?
  7. 2342.jpg

    https://www.dropbox.com/s/5fmt2h4a6dlgsn0/exampleeventscreenshot.JPG?dl=0

    This is just an example, but here you see the script calls to get dialogue, but the event processes move routes before the player finishes scrolling through the dialogue. I want to pause this event in the plugin, and when the user finishes reading the dialogue, the plugin will then unpause and the event will continue on to the movement route... and so on.
  8. I can't see the picture because the website you linked to requires registration before it shows the picture.
  9. Solved.
    The solution was to move actions to a separate event tile and call on it when ready using:
    $gameMap.event(eventId).start()
  10. 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.