Hi all...
I'm proud to share my first piece of script done by using BGT.

I'm not lookingfor congratulation or so, just suggestion in how to improve it 
reducing the number of lines.
The script is without comments but it's so simple and linear that I 'M sure it 
doesn't need at all.

here it is.

***
void main()
{
show_game_window("Morse Key 1.0 By Gabriel battaglia");
sound suono; tts_voice voce;
suono.load("1sec_beep.ogg");
int vol=-10; int pan=0; int pic=100;
suono.volume=vol; suono.pan=pan; suono.pitch=pic;
voce.speak_wait("Hello, and welcome to the Morse Key by Gabriel Battaglia. Please use the harrow keys and page up and down to adjust your keyer, then press escape when finished.");
suono.play_looped();
while(key_pressed(KEY_ESCAPE)==false)
 {
 if (key_down(KEY_LEFT)&&pan>-100==true)
  {pan--;}
 if (key_down(KEY_RIGHT)&&pan<100==true)
  {pan++;}
 if (key_down(KEY_DOWN)&&pic>20==true)
  {pic--;}
 if (key_down(KEY_UP)&&pic<450==true)
  {pic++;}
 if (key_down(KEY_NEXT)&&vol>-30==true)
  {vol--;}
 if (key_down(KEY_PRIOR)&&vol<1==true)
  {vol++;}
 suono.pan=pan; suono.pitch=pic; suono.volume=vol;
 wait(5);
 }
 suono.stop();
 voce.speak_wait("nice! Now you can type your morse code by pressing the left shift, 
and escape when you've done. Enjoy!");
 while(key_pressed(KEY_ESCAPE)==false)
  {
  if (key_down(KEY_LSHIFT)==true)
   {suono.play_looped();}
  else
   {suono.stop();}
  }
  suono.stop();
  voce.speak_wait("Thank you very much, I hope you had fun. Have a nice day!");
  exit();
}
***

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to