Chaos Project

RPG Maker => Tutorials => Topic started by: Arkaea Halfdemon on June 19, 2009, 05:32:03 am

Title: Quit game? [Answered]
Post by: Arkaea Halfdemon on June 19, 2009, 05:32:03 am
I was just wondering how I would go about making the game quit, without accessing the menu. I'd like to have an option to quit simply in a "Show Choices" box.

... I know I have to call a script, and the command to call is most likely in the RTP already, but I know pretty much nothin' about scripting/calling scripts. It'd be greatly appreciated if someone could post the lines to put into the script call, and if you feel like it, perhaps explain (however briefly) how it works. Heaven knows that I'd like to learn to script, eventually. The complexity of it is a bit daunting, though, truth be told...


1 = 0.9,

Arkaea
Title: Re: Quit game?
Post by: Blizzard on June 19, 2009, 05:44:28 am
"$scene = nil" will exist the game "nicely". Simply "exit" or "exit!" in a script call will terminate the game immediately.
Title: Re: Quit game?
Post by: Arkaea Halfdemon on June 19, 2009, 05:49:37 am
Ah. Thanks very much... makes perfect sense and whatnot.



*feelin' like the noob*

Arkaea
Title: Re: Quit game? [Answered]
Post by: Blizzard on June 19, 2009, 06:10:31 am
No problem, there's no way you could have known.
Title: Re: Quit game? [Answered]
Post by: fugibo on June 19, 2009, 02:28:46 pm
Actually,

def compare(n, n)
  return n.to_i == n.to_i
end

returns true for

compare(1, 0.9)
Title: Re: Quit game? [Answered]
Post by: Blizzard on June 19, 2009, 02:49:00 pm
Because the second argument overwrites the first one and you compare it to itself. Very smart. It will return true whatever you put in.
And did you accidentally post in the wrong topic? O_o
Title: Re: Quit game? [Answered]
Post by: fugibo on June 19, 2009, 02:51:19 pm
...stupid argument names.
Title: Re: Quit game? [Answered]
Post by: Arkaea Halfdemon on June 19, 2009, 03:22:17 pm
Quote from: Blizzard on June 19, 2009, 02:49:00 pm
Because the second argument overwrites the first one and you compare it to itself. Very smart. It will return true whatever you put in.
And did you accidentally post in the wrong topic? O_o


I think he's doing... something... with my "1 = 0.9" signoff.

... It's a math paradox, though (I've seen the equation to prove it). Not a script thingy.  :O.o:
Title: Re: Quit game? [Answered]
Post by: fugibo on June 19, 2009, 03:57:30 pm
Are you  referring to 9/9?
Title: Re: Quit game? [Answered]
Post by: Ryex on June 19, 2009, 08:06:13 pm
Zeno's Paradox! um well.. not really its the .99999999999999 continued really is equal to 1 thing
Title: Re: Quit game? [Answered]
Post by: Arkaea Halfdemon on June 19, 2009, 08:12:31 pm
Yeah. But .9 is easier to type :3
Title: Re: Quit game? [Answered]
Post by: fugibo on June 19, 2009, 10:31:53 pm
Zeno's paradox is really stupid; the racers objective is to reach the finish line, not to cross the halfway mark.
Title: Re: Quit game? [Answered]
Post by: Arkaea Halfdemon on June 19, 2009, 10:55:57 pm
Quote from: Longfellow on June 19, 2009, 10:31:53 pm
Zeno's paradox is really stupid; the racers objective is to reach the finish line, not to cross the halfway mark.


Unless he's grossly obiese.
Title: Re: Quit game? [Answered]
Post by: fugibo on June 20, 2009, 02:03:48 pm
Quote from: Arkaea Halfdemon on June 19, 2009, 10:55:57 pm
Quote from: Longfellow on June 19, 2009, 10:31:53 pm
Zeno's paradox is really stupid; the racers objective is to reach the finish line, not to cross the halfway mark.


Unless he's grossly obiese.


So fat people like repeatedly going half way forever? >_<
Title: Re: Quit game? [Answered]
Post by: Arkaea Halfdemon on June 20, 2009, 05:48:27 pm
I think doing anything forever would be rather abysmal.