Quit game? [Answered]

Started by Arkaea Halfdemon, June 19, 2009, 05:32:03 am

Previous topic - Next topic

Arkaea Halfdemon

June 19, 2009, 05:32:03 am Last Edit: June 19, 2009, 05:49:58 am by Arkaea Halfdemon
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

Blizzard

"$scene = nil" will exist the game "nicely". Simply "exit" or "exit!" in a script call will terminate the game immediately.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Arkaea Halfdemon

Ah. Thanks very much... makes perfect sense and whatnot.



*feelin' like the noob*

Arkaea

Blizzard

No problem, there's no way you could have known.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo

Actually,

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

returns true for

compare(1, 0.9)

Blizzard

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
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo


Arkaea Halfdemon

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:

fugibo

Are you  referring to 9/9?

Ryex

Zeno's Paradox! um well.. not really its the .99999999999999 continued really is equal to 1 thing
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Arkaea Halfdemon

Yeah. But .9 is easier to type :3

fugibo

Zeno's paradox is really stupid; the racers objective is to reach the finish line, not to cross the halfway mark.

Arkaea Halfdemon

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.

fugibo

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? >_<

Arkaea Halfdemon

I think doing anything forever would be rather abysmal.