Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Synthetique on Thu 15/05/2003 11:00:10

Title: Need help.. GUI maybe?
Post by: Synthetique on Thu 15/05/2003 11:00:10
Hey all.. long time now..

I need some help here. I got this great idea (it's all mine), i came up with it on my own without inspiration from any game, when i was playing "The legend of Zelda : Ocarina of Time".

I thought i should have a magic saxophone in my game! And when using it in the inventory, one could play some tunes. Ofcourse you would have to play them damn notes the right way for anything to happen..

*goin fer a smoke* brb..

Now.. i've made the sounds for them keys, and i've made some pics that should pop up when using the sax.. It's an alto sax by the way. :D
Here's the pics:
(http://www.2dadventure.com/ags/saxos.jpg)

And the keys are CTRL, Left arrow, right, up, down.

Uh.. how should i do it? Should i make a gui or something? And how would i make the script?
I want the right arrow pic when that button is pressed and the sound should play at the same time.. Please help me out a bit.

Thanks!
/synth
Title: how to make a sax?
Post by: Synthetique on Thu 15/05/2003 15:06:19
I posted this in the beginners forum first, but i changed my mind about it..
i think its not a beginners question..

I thought i should have a magic saxophone in my game! And when using it in the inventory, one could play some tunes. Ofcourse you would have to play them damn notes the right way for anything to happen..

Now.. i've made the sounds for them keys, and i've made some pics that should pop up when using the sax.. It's an alto sax by the way. :D
Here's the pics:
(http://www.2dadventure.com/ags/saxos.jpg)

And the keys are CTRL, Left arrow, right, up, down.

Uh.. how should i do it? Should i make a gui or something? And how would i make the script?
I want the right arrow pic when that button is pressed and the sound should play at the same time.. Please help me out a bit.
I want it to be as in the zelda 64 games..

Thanks!
/synth
Title: Re:Need help.. GUI maybe?
Post by: Scorpiorus on Thu 15/05/2003 16:44:50
Hey, great idea. :)

I've gotten interested in. At first I wanted to post a scipt but it's not evident how to use it without a GUI demonstration. So I made a saxophone template. Yep, it uses a GUI to show notes (signs). Well actually it doesn't play anything because I haven't suitable sound files right now. To assign a sound file open global script and find:


....
//Specify appropriate sound files here. They would be played as PlaySound(<sound_number>);
//======= Sound names === Files =====
#define SAX_SOUND_CTRL      1
#define SAX_SOUND_UP        2
#define SAX_SOUND_RIGHT     3
#define SAX_SOUND_DOWN      4
#define SAX_SOUND_LEFT      5
....


these lines. Next replace the numbers above to your values depending on numbers of you sound files.

There is a Noteline string variable to help recognize the tunes. It records all notes so you can check it in repeatedly:
if ( StrComp(Noteline, "CUDLC") == 0 ) Display ("Tada!!!");
will display the message "Tada!!!" provided the player has played: CTRL, UP, DOWN, LEFT, CTRL. (seems like MortalKombat special moves hehe ;D)


Hope this helps. ;)

Link: Saxophone template v1.0 (http://invis.free.anonymizer.com/http://geocities.com/scorpiorus82/saxphone.zip) AGS2.55beta4 required.

PS Let me know how it works and ask questions if any.

-Cheers
Title: Re:Need help.. GUI maybe?
Post by: Synthetique on Thu 15/05/2003 16:49:23
seems great! thank you! :)
Title: Re:how to make a sax?
Post by: miguel on Thu 15/05/2003 23:26:00
hi, I think somebody did a gui like the one used on LOOM, I don´t know  if it is an open code gui, but maybe you could ask around and maybe who did it could help you
hope it helps
Title: Re:how to make a sax?
Post by: Spyros on Fri 16/05/2003 14:58:06
I made the loom template. You can get it and see the code I used. It's posted somewhere in the tech forum.
Title: Re:Need help.. GUI maybe?
Post by: Scummbuddy on Fri 16/05/2003 18:43:41
I merged both the topics, so if this thread up till now doesnt make sense and jumps around, thats why.