Event Skip Request

Started by Memor-X, February 08, 2011, 09:19:56 pm

Previous topic - Next topic

Memor-X

i'm looking for a script which, when a certain switch is on, if i press Esc (or any key i choose), all events stop and a common event then starts, i want to use it for skipping cutscenes, that's why i want a common event to be executed when all events stop, so i can use a transition to place the player at the end of the cutscene, i've tried editing the Interpreter 2 script but that failed so much

thanks in advance

ForeverZer0

It would be far easier to simply implement a common event with a loop checking for the input during the actual cutscenes.
I can only imagine the the thousands of possible bugs in terminating all running events through a script. You will maintain much more control this way, without the huge chance of bugs.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Memor-X

yeh but then it would auto cancel messages would it?

ForeverZer0

That can be done manually with a single script call as well.
In the event that is running the cutscene, make a new page at the end with the condition being a switch you have labeled "Scene Skip" or whatever makes you happy. Here you can customize exactly what happens if the player skips this scene, like having NPC relocate, appear, disappear, switches/variables change, items gained, etc, etc. Anything that would have normally changed thoughout the normal course of the cutscene. Now all you need to do, is on the same map create a parallel event which looks for the Escape button being presses. All it has to do is flip the "Scene Skip" switch on and there you go, the scene has been skipped without any adverse side effects since you customized the exact things that need to occur/change for this particular scene. This could not, or I should say, would be extremely difficult and just not practical to try and emulate in a script.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Memor-X

ok, so what's the call script to get rid of the message box, also, doesn't the current page of the event get loaded into memory? i remember seeing a list[] variable in Interpreter 1

ForeverZer0

February 08, 2011, 10:43:19 pm #5 Last Edit: February 08, 2011, 10:44:24 pm by ForeverZer0

class Scene_Map
 attr_accessor:message_window
end

class Game_Temp
 
 def self.terminate_message
   # Make sure the message window is actually showing...
   if $game_temp.message_window_showing
     # Clear the callback method
     $game_temp.message_proc = nil
     # Execute the method through Scene_Map to clear all the message data
     $scene.message_window.terminate_message    
     # Clear the showing flag
     $game_temp.message_window_showing = false
     # End the currently running event's command
     $game_system.map_interpreter.command_end
   end
 end
end


Okay, I did notice that it takes an added attr_accessor to do it easily. Just paste the above code into your script editor. Now all you have to do is in the events scene skip page, have a script call that simply reads:
$game_temp.terminate_message

It will immediately kill any message window that may happen to be showing.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.