Skip part of the event?

● ARCHIVED · READ-ONLY
Started by ElvenNeko 52 posts Page 2 of 3 View original ↗
  1. By replacing the Autorun with a parallel event.
    The Autorun is very restrictive in its function, as it runs from start to finish, but the parallel event works in the background, running simultaneously, making it easier to bypass.

    An example of this is shown in the 2 video (Unskipped_scene and Skip_Scene). The first part (Unskipped_scene) plays my scene, which includes: image movement, movement route on the player, and a text message.

    In the second part(Skip_Scene), I press the "Z" key to skip my scene.

    Back to my question. A scene created this way can be skipped with just a few commands, whereas a scene that uses a video ("play movie") becomes more difficult. In fact, we would have to deal with stopping the video and removing the black background that RPG Maker creates for it. Let's say the difference I wanted to highlight is precisely this.
  2. ISC said:
    By replacing the Autorun with a parallel event.
    Then you're losing the whole purpose of autorun, to block input so the player can't walk around and open menus during the cutscene.

    I'm not sure why you're making and zipping videos instead of just posting screenshots of events people can look at, but I'll bow out of this. You clearly have some notion of how you think it can work - I just don't think it'll pan out :wink:

    But I'm not always right - good luck!
  3. The truth is that I have the engine set to my native language. But you're right, to provide better help, event screenshots are necessary. I'll try to change the language of RPG Maker MZ (it seems there's no direct option for it, I'll investigate).

    As for the mechanic, I did it this way:

    Autorun event with:
    • Disable menu
    • Switch "Skip Button" = On
    • Switch "Scene Start" = On
    • Erase Event
    Parallel map event "Scene". Activation Switch: Scene Start

    • Set movement route -> Player (Wait)
    • Move down
    • Move down
    • Move down
    • Move right
    • Move right
    • Move right
    • Show image(1) ...
    • Move image(1) ...(wait)
    • Text Box
    Parallel common event "SkipScene" . Switch: Skip Scene
    • If the "ok" button is pressed
      Switch "Scene Start" = Off
      Erase image(1)
      Transfer Player ...
      Switch "Skip Button" = Off
    • End
    Obviously, this assumes that the player is the one moving through the scene and not an event. As you can see, the player's click is blocked by the movement's Wait (same for the image). The initial autorun also disables the menu to avoid accidental openings.

    If this is what the requester is asking for, I'll share the code after switching the language.
  4. So if the actual issue is that you can't interrupt an autorun event with a button press, and an autorun is what you'd typically use for cutscenes because it blocks player input and disables menu access:

    I'd suggest make it a parallel event instead, disable menu access and use this script to disable player movement
    JavaScript:
    if($gamePlayer.moveByInputCached === undefined)
    //This checks if the value is undefined
    
    $gamePlayer.moveByInputCached = $gamePlayer.moveByInput;
    //If it is undefined, it sets to the current value of $gamePlayer.moveByInput which is 'true'
    
    $gamePlayer.moveByInput = function(){
    return false;
    }

    To enable movement again
    Code:
    $gamePlayer.moveByInput = $gamePlayer.moveByInputCached;
    //This resets the value of moveByInput to the cached value

    Then have another parallel event listening for button press, which would trigger a self switch of the first event, or transfer to new scene (whatever each section of the cutscene is. If on the same map, do the self switch, if different maps, transfer).
  5. So i searched for plugins, but found only two paid ones, and it seems like both of them are outdated.
    The only free one i found were for MZ.
    AquaEcho said:
    So if the actual issue is that you can't interrupt an autorun event with a button press, and an autorun is what you'd typically use for cutscenes because it blocks player input and disables menu access:

    I'd suggest make it a parallel event instead, disable menu access and use this script to disable player movement
    JavaScript:
    if($gamePlayer.moveByInputCached === undefined)
    //This checks if the value is undefined
    
    $gamePlayer.moveByInputCached = $gamePlayer.moveByInput;
    //If it is undefined, it sets to the current value of $gamePlayer.moveByInput which is 'true'
    
    $gamePlayer.moveByInput = function(){
    return false;
    }

    To enable movement again
    Code:
    $gamePlayer.moveByInput = $gamePlayer.moveByInputCached;
    //This resets the value of moveByInput to the cached value

    Then have another parallel event listening for button press, which would trigger a self switch of the first event, or transfer to new scene (whatever each section of the cutscene is. If on the same map, do the self switch, if different maps, transfer).
    1726666276532.png
    1726666092566.png
    Still not working. Pressing down cancel does nothing, seems like second parallel is ignored for some reason.
  6. ElvenNeko said:
    Still not working. Pressing down cancel does nothing, seems like second parallel is ignored for some reason.
    You can't remotely jump to label on a different event. You can remotely toggle a self switch on another event
  7. Still not working1726676721927.png1726676704641.png
  8. ElvenNeko said:
    Still not workingView attachment 318081View attachment 318080
    You're still putting the jump to label command in the button press. I told you you can't do that. You have to put the change self switch script in the button press.

    Also don't put leading zeros. I did not put leading zeros in my example. That makes javascript parse the number as octal. At low numbers there's no difference but above 8 or so it becomes a different number
  9. AquaEcho said:
    You're still putting the jump to label command in the button press. I told you you can't do that. You have to put the change self switch script in the button press.

    Also don't put leading zeros. I did not put leading zeros in my example. That makes javascript parse the number as octal. At low numbers there's no difference but above 8 or so it becomes a different number
    So i need 3 events on parallel run. First is my main event that has the only different is label added to specific spot where skip should end.
    Second event that self switches third event when button is presssed
    And third event that makes jump to label?
    It still does not work tho. Also just noticed that i forgot to remove self switch from event 2, removed it, still not working.
    1726680297052.png1726680263705.png
  10. If you're interested, the update to version 1.8.1 includes text skipping.

    1726680660305.png
  11. No, you only need two events. One event with the code for the cutscene and another to listen for button press. Your third event does nothing. You can only jump to label within the same event. You cannot make another event force the first event to jump to label.

    You would have each section of the cutscene in a new event page in the first event. The button press would just force the first event to toggle its self switch and start the next page of the cutscene.
  12. ISC said:
    If you're interested, the update to version 1.8.1 includes text skipping.

    View attachment 318088
    Sadly i do not own MZ. And message waits is not what i want to skip.
    AquaEcho said:
    No, you only need two events. One event with the code for the cutscene and another to listen for button press. Your third event does nothing. You can only jump to label within the same event. You cannot make another event force the first event to jump to label.

    You would have each section of the cutscene in a new event page in the first event. The button press would just force the first event to toggle its self switch and start the next page of the cutscene.
    Ah, i think i got the logic of it, will try to do that.
    But will it work with show movie command? If i remember correctly, even in parallel process it ignores user input.
  13. I dont know if it will interrupt a video or not. You might have to put additional code in the button prese script to check if a video is playing and force it to stop.
  14. AquaEcho said:
    I dont know if it will interrupt a video or not. You might have to put additional code in the button prese script to check if a video is playing and force it to stop.
    So it worked as you said. But:

    - Does not skip the scrolling text (event changes, but text remains until it's fully scrolled)
    - Does not skip movies
    - Instantly works on button press. That's the most problematic part, is it possible to make it work on button hold to avoid random pressing?
  15. You can either use the script: Input.isLongPressed('cancel') or have the button press increment a another variable by 1 then trigger the effect once that variable reaches a certain number, e.g. 10
  16. AquaEcho said:
    You can either use the script: Input.isLongPressed('cancel') or have the button press increment a another variable by 1 then trigger the effect once that variable reaches a certain number, e.g. 10
    Thank you, this worked! Would be great if holding were a bit longer (it's like one second now), but it's way better than just pressing, so it will do. Probably the second method should be longer, but i am not exactly sure how to do that, i only recently first tried to work with variables.

    AquaEcho said:
    You might have to put additional code in the button prese script to check if a video is playing and force it to stop.
    Do you know what code might do that? I don't even think that check is necessary because i would use it only during video plays.
  17. ElvenNeko said:
    Thank you, this worked! Would be great if holding were a bit longer (it's like one second now), but it's way better than just pressing, so it will do. Probably the second method should be longer, but i am not exactly sure how to do that, i only recently first tried to work with variables.
    You can either put a wait 1 frame in the current event or do the variable increment in a conditional within the conditional, e.g.
    >if Cancel is pressed, ButtonPressCount +1
    >If ButtonPressCount = 10
    >Script to toggle self switch
    >ButtonPressCount=0
    ElvenNeko said:
    Do you know what code might do that? I don't even think that check is necessary because i would use it only during video plays.
    I don't use videos or scrolling text so I don't know any more than you. You can ask in the Javascript questions thread
  18. AquaEcho said:
    >if Cancel is pressed, ButtonPressCount +1
    >If ButtonPressCount = 10
    >Script to toggle self switch
    >ButtonPressCount=0
    Syntax error - unexpected token.