Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Edwin Xie on Sat 02/10/2004 23:03:59

Title: Solved, Setup Icon, solved, debug script
Post by: Edwin Xie on Sat 02/10/2004 23:03:59
1. T'is an issue that has been bothering me lately. I wonder if I can change the Setup file of the game's icon. I know how to change the game's.....I couldn't find this in the manual and earlier I couldn't find anything that is related to this topic in the forum. So.....any ideas? I know there is a possibility since I saw an example in Equilibrum by JudasFan. Thanks LostTraveler for solving this problem........

2. Ok, another problem, I want to know how to turn off and turn on debug options in script. Is it possible?
Title: Re: Changing the Setup's Icon
Post by: Moox on Sat 02/10/2004 23:05:54
Its in the same section of the manual I believe
Title: Re: Solved, Setup Icon, Unsolved debug script...
Post by: Edwin Xie on Sun 03/10/2004 00:18:37
Ok....thanks...............now I need to know about the debug script (A.K.A. Bump)
Title: Re: Solved, Setup Icon, Unsolved debug script...
Post by: Goot on Sun 03/10/2004 00:48:47
In the global script, under

on_key_press(int keycode){

find the part about debugging. The bebug lines will look something like:

if(keycode==xxx)Debug(x);

In the game editor turn debug mode on, and use a global var for wether or not you want it to be enabled. Change the debug lines to:

if((keycode==xxx)&&(GetGlobalInt(xx)==1)){
Debug(x);
}

(Replce the x's with the appropriate numbers, xx being the global int you're using, and xxx and x the same as in the original line. Do this for all the debug lines. They should be together.
Title: Re: Solved, Setup Icon, Unsolved debug script...
Post by: Edwin Xie on Sun 03/10/2004 01:01:24
That script seems quite confusing, can you give and example and an explanation?
Title: Re: Solved, Setup Icon, Unsolved debug script...
Post by: Edwin Xie on Sun 03/10/2004 03:39:40
Bump, so you can you can use any number you want for xx as long as it is available? I'm doing this for a textbox GUI that turns on debug options if you type in the correct series of characters so I just use SetGlobalInt for that? All I want to know now is what (GetGlobalInt(xx)==1) means.

Edit: There was a parse error PE04 at &&
Edit2: The problem is that && statements happen only when it is enclosed in parenthesis. EX. if (something && somethingelse){
//code here
}
In this case it would be
if((keycode==xxx)&&(GetGlobalInt(xx)==1)[/red]){
Debug(x);
}
(with the ones in red not needed)
Oops, oh well, at least that is what I expected. Hmm, strange........why am I ther person telling while the other person should do that job?

Title: Re: Solved, Setup Icon, solved, debug script
Post by: Phemar on Sun 03/10/2004 06:32:14

You should create your textbox.

At the top of your global script:

string UserInput;


Under your interface_click for the textbox button.

if (StrCaseComp(UserInput,"debug on")==0) {
  if (game.debug_mode==0) {
    game.debug_mode=1;return;}
  else if (game.debug_mode==1) {
    game.debug_mode=0;return;}}
Title: Re: Solved, Setup Icon, solved, debug script
Post by: Edwin Xie on Sun 03/10/2004 06:56:48
*Smacks head
game.debug_mode, why didn't I think of that?