Calling a script that will force shutdown the game in an instant.
Force Shutdown Script
RGSS2 Script RequestsTry this:
Code:
SceneManager.exit
didn't work, i got an error "uninitialized constant"
But that worked for me. Re-check your script call, it must exactly same with that.
SceneManager.exit
SceneManager.exit
LAWL... Y'all be newbs..
exitThat is all...
Edit...
Dont even know if that works for RGSS2, but I doubt the SceneManager method will work. (im not the best with rgss2 🙂 )
exitThat is all...
Edit...
Dont even know if that works for RGSS2, but I doubt the SceneManager method will work. (im not the best with rgss2 🙂 )
Oh, thanks mastah. I didn't know before I can just write exit.
Damn, didn't realize it was RGSS2 🤔
Neither did I till after I had posted 🙂
def quit_game (arg) if arg = "yes" exit elsif arg = "no" # this is a comment endendSomething like that, just call the method and do quit_game("yes") then it will quit your game.
Well... no...
That would always exit, cause its setting arg to 'yes' then checking if arg exists, which it does, cause you just set it, then its calling exit. You would have to use two equals signs to mean 'if equals', one just sets the variable.
Also, if you were going to do something like that, may as well do it like this..
def quit_game(*argz, &blawk) return unless argz[0] blawk::call if blawk && block_given? exit endThen you can do calls like..
Code:
@time_to_quit = true # or 'yes'quit_game(@time_to_quit) do # Do some other stuff before exit, # for whatever reason..end
Sorry about that, been high on C# forever, forgot that you need "==" to actually mean equal.
Alternatively, you could use this script call:
Code:
$scene = nil
Original thread: https://forums.rpgmakerweb.com/threads/force-shutdown-script.42992/