Two probs solved - now THIRD ONE

Started by Best, Tue 14/09/2004 22:08:09

Previous topic - Next topic

Best

I want to ask you this: I want to play a sound, but just sometimes. Do I have to use timer? And how? For example there is a forest and I want to use one sound (bird) just ocasionaly (FE: every 30 seconds).
And one more question: If I have the name of my game XXX and I want to rename it to YYY, will it change anything? I do not mean the  name in Global Settings, but the name of the compiled file, which also show up when I want to edit the game (in load game at the startup of AGS). Hope its not too chaotic. And one more ques:f) I have my own GUI inventory and the items are just jumbled up on one place. How do I do that so they are separated in the inventory?
Thanx alottttttt!
Valame tes lan-utas desi gronto?

Skio

In the first dialog, put under the dialog option which will enable the option in EGO2 the command:
    run-script 1

In the dialogue_request function in the global script (create it if you haven't already - check the HELP) put:
    if (var==1) SetDialogueOption(EGO2 dialogue, option, 1)

Î'νδρων Επιφανων Πασα Î"η ΤαφοÏ,

Albert Cuandero

The command is surprisingly: PlaySound (int sound_number)Ã,  ;)

to play on click just set your button to "run script" then edit script to):

if (inerface == 0) {Ã, 
Ã,  if ( button == 0) {
Ã,  do_something ();
Ã,  PlaySound (0);
Ã,  }
}

to play on hovering I wouldÃ,  have to look up (guess whereÃ,  ;))


Ã, 
int do_you_like_me;
if (do_you_like_me == 1) Display ("You can call me Al");
else {}

Best

Valame tes lan-utas desi gronto?

Radiant

Renaming the executable would invalidate any existing saved games, as well as the associated SETUP.EXE file, but other than that there are no problems.

As to your inventory question, look under game. variables in the help, there's something like inv_item_size that should help.

Scorpiorus

Quote from: Radiant on Fri 17/09/2004 18:15:44Renaming the executable would invalidate any existing saved games, as well as the associated SETUP.EXE file, but other than that there are no problems.
Yep, so to rename your game you have to rename its folder name and recompile.

QuoteAs to your inventory question, look under game. variables in the help, there's something like inv_item_size that should help.
Also take a look at the SetInvDimenstions command in the manual.

Best

Thanx guys and whatta bout tha sound repeating?
Valame tes lan-utas desi gronto?

Radiant

Put 'SetTimer (1, 1200)' in the enter_room script.
Then, in repeatedly_execute, add
if (IsTimerExpired (1)) { PlaySound (42); SetTimer (1, 1200); }

There are a bunch of other methods but this should work. 1200 = 30 * 40, since you wanted 30 seconds and there's 40 frames to a second on the default speed setting.

Best

Valame tes lan-utas desi gronto?

Raider

um I'm no moderator, but watch the spelling and spell words properly.
(I used to spell words like texting but got told to spell properly). I sound bossy now but I don't mean to, just trying to help.  :-[

- Raider

SMF spam blocked by CleanTalk