Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: monkey0506 on Wed 28/07/2004 16:40:16

Title: Rescripting Alt-X?
Post by: monkey0506 on Wed 28/07/2004 16:40:16
Is it possible to rescript alt-x? In true SOMI style, if you press alt-x it turns on the quit gui, so I'd like to do that if it's possible. I'm trying to get as close to true SOMI style as possible...
Title: Re: Rescripting Alt-X?
Post by: Proskrito on Wed 28/07/2004 17:00:39
Don't think so. Alt-x is hard-coded to abort the game, i think.
But i could be wrong, so anyone correct me then, please : )
Title: Re: Rescripting Alt-X?
Post by: Sam. on Wed 28/07/2004 19:07:51
your almost right.alt-x cannot be altered. I think you both mean ctrl-x because alt-x does nothing. you CAN programme ctrl-x

go into your global script and look for a list under the titel On_keypress, then look for the one that has alt-x written in green next to it. in this place replace the code there with GUIon (int guinum);. If there is green sctip saying alt x, go into hel and look for keyboard references. this shoul (hopefully) bring up a list of references shwing the numbers which realte to teh relevant keys. I will go and look on my laptop in a sec and bring you some sample code.
EDIT: you should end up with this
if (keycode==24) GUIon (intGUI);
Title: Re: Rescripting Alt-X?
Post by: on Wed 28/07/2004 20:05:40
No... I need ALT-X. NOT CTRL-X. I need CTRL-C. And ALT-X. But not CTRL-X. I MUST HAVE IT!!!
Title: Re: Rescripting Alt-X?
Post by: Ishmael on Wed 28/07/2004 20:07:31
Alt-X is, to my knowlegde, hardcoded for abort under any circumstaces (apart from a complete system hangup). So I see no way to recode it.
Title: Re: Rescripting Alt-X?
Post by: Akumayo on Wed 28/07/2004 21:01:20
perhaps you could run an interaction in the Global Repeatedly Execute that says this:

if (GUIOn(the quit GUI)==1) {
  GUIOff(the quit GUI);
}

it may work...
Title: Re: Rescripting Alt-X?
Post by: on Wed 28/07/2004 22:30:56
What? I know it probably would never work, but I'm trying for authenticity. In The Secret of Monkey Island(TM), there were at least 3 ways to turn on the quit gui:

1. F5 to pull up the menu. Left click on Quit.
2. Alt-X.
3. Ctrl-C.

I'm trying to replicate the GUI as best as possible. Perhaps once I learn enough I'll turn my back on AGS and write an engine myself. That way I won't have to worry about these things. Well, that's what I hope to be able to do. No offense, AGS is awesome, but limitations like these limit the authenticity of these kind of these kind of GUIs. Still, AGS is the best free engine on the market...
Title: Re: Rescripting Alt-X?
Post by: Snarky on Wed 28/07/2004 22:58:06
The reason Alt-X is hardcoded is almost certainly that otherwise a bug in the game scripts could make it impossible to quit. This does not limit the "authenticity" of a GUI, only your ability to exactly replicate an existing one.

Do you really think anyone would care that this one particular key combination does something slightly different? As you point out, it's not like there aren't other ways to bring up the GUI.
Title: Re: Rescripting Alt-X?
Post by: Sam. on Thu 29/07/2004 10:51:53
WOah there. lets not think about screwing over ags. its possibly the most powerful adventure game prog on the net. just because you can't EXACTLY replicate a gui is no need to go into a big huff. Would you be able to exactly replicate the grapics styles, the atmosphere and the writing of SOMI? Personally i don't think so. but if you do. go ahead and write oyu own program
Title: Re: Rescripting Alt-X?
Post by: Mr Jake on Thu 29/07/2004 13:41:39
you took that totally out of context then zooty....
Title: Re: Rescripting Alt-X?
Post by: on Thu 29/07/2004 17:52:17
Wooo... Well, I think I know what I'm going to do.  ::)                 



Not 100% sure what I'm going to do yet... but I'm nearly convinced...
Title: Re: Rescripting Alt-X?
Post by: Ben on Thu 29/07/2004 22:41:24
Quote from: Hotspot on Thu 29/07/2004 13:41:39
you took that totally out of context then zooty....

He make a good point though. If you're that obsessive about staying "authentic" to a game, why even make something original? Why not just burn copies of Monkey Island and tell people you made it? I always thought the reason AGS had a great scripting language and customized GUIs was to give people creative freedom.. It's kind of ironic that somebody wants to change a keyboard command so that he can make his game exactly like something else.
Title: Re: Rescripting Alt-X?
Post by: on Fri 30/07/2004 21:28:36
I am not trying to copy the games. I'm trying to copy the GUI. NOT THE GAME. THE GUI. I have my own storyline. I'm not trying to copy the game. You know what. Screw it. Screw all of it. Screw all of you. Forget this crap.
Title: Re: Rescripting Alt-X?
Post by: Alynn on Sat 31/07/2004 05:52:42
Someone had a healthy portion of "Bitch Flakes" this morning....
Title: Re: Rescripting Alt-X?
Post by: Moox on Sat 31/07/2004 05:58:55
DONT TALK IN CAPS OR FLAME PEOPLE
Title: Re: Rescripting Alt-X?
Post by: Mr Jake on Sat 31/07/2004 08:39:42
Quote from: LostTraveler on Sat 31/07/2004 05:58:55
DONT TALK IN CAPS OR FLAME PEOPLE


that was utterly stupid :P

You must admit that some people weren't answering his question, but just bitching at him for saying that when he is better with coding he might make his own engine for his game.
Title: Re: Rescripting Alt-X?
Post by: Scummbuddy on Sat 31/07/2004 20:44:07
See what happens when this board goes unmoderated for 5 days....  ;D

I understood LostTravelers joke, and Hotspot made a perfect point. So, you both get a zing point, and you are both equal. Just relax, you guys are fine. This is nothing to get all worked up about. Its just that you cant really always notice sarcasim on the internet. Go back to being forum-friends please.

Quote from: monkey0506 on Wed 28/07/2004 22:30:56
I'll turn my back on AGS and write an engine myself.

I think you just picked the wrong phrase to say, because that one can really push the wrong buttons of us AGS-enthusiasts. But you were taking the news of not being able to Alt-X your way out of a game your way a bit too harsh.
Title: Re: Rescripting Alt-X?
Post by: Mr Jake on Sat 31/07/2004 21:15:00
please notice the  :P   

:P
Title: Re: Rescripting Alt-X?
Post by: Ishmael on Sun 01/08/2004 12:35:48
Excuse me for bringing up my mind, but I think it's still worth the try... :P

function repeadetly_execute() {
  if (IsKeyPressed(407) == 1) {
    if (IsKeyPressed(88) == 1) { // now don't hang me if this isn't X
      GUIOn(QUITQUI);
    }
  }
}
Title: Re: Rescripting Alt-X?
Post by: on Mon 09/08/2004 00:49:35
QuoteI'll turn my back on AGS and write an engine myself.

Oh my... Did I really say that??? Oh. Well, I was rather mad at AGS at the time, but I've cooled off a bit now. That is not what I meant. I do HOPE to one day be able to write my own engine. Then again I HOPE to make a quantum supercomputer and build an unlimited energy source run off of water and supply it to the world for free...  :P  I'll take a look at all the features, and the limitations again, but for TMI I definitely want 100% GUI authenticity. If I have to go else where, so be it, it would be good to see some other styles of scripting. However, I am considering doing "Game #2" with AGS. I can't believe I said that first part. Ok... Well, let me be the first to say I'm sorry. I am being pretty anal about the 100% authentic GUI thing, but...

QuoteI HOPE to make a quantum supercomputer and build an unlimited energy source run off of water and supply it to the world for free...

I'm a pretty anal person.
Title: Re: Rescripting Alt-X?
Post by: Snarky on Mon 09/08/2004 01:02:05
Considering the fact that Monkey Island has been released with several different interfaces, I'd say your obsession with "authenticity" goes beyond anal.