Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - RGSS: Exit software with input code

Save-Point

Full Version: RGSS: Exit software with input code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there all,

I have a quick question for a single line of code in RGSS:

Context:
Custom Title Screen menu: New Game, Load Game, Exit.

What I need is a piece of code that will exit the software by the "Input Code" event. Otherwise I can't quit the software! Any idea what I need to do/write? I've seen this somewhere but can't find it anymore.


Thanks a lot for any help!
This is off the top of my head.

Code:
Input.trigger?(Input::C)
$scene = nil
end

Edit (8/26/11 @4:28am): I forgot if.
Code:
if Input.trigger?(Input::C)
$scene = nil
end
That does its job but not the way I intended! XD
It does quit but only because there's an error. lol
$scene = nil is right, but if you don't already have a check for the pressing of a key - i.e. through the Input Code command, you need to change that first line into if Input.trigger?(Input::C).
I don't know anything about RGSS.
If someone can just write exactly what I need then I can copy+paste it, that would be wonderful. ^^
Without knowing the custom script you are using we cannot give you that.
If you cannot complete the task with the information present in this topic I suggest you give us a link to the script or upload a demo which illustrates the problem.

*hugs*
Lol, no pre-made custom scripts involved! :)
This all takes place on a map and is programmed with events.

I literally need something that will close the software.
Then put $scene = nil in a Call Script command. That's the only way to do it.
That's it! Spot on! Thanks! =3