Re: BGT pack stuff and custom classes and functions

2015-02-15 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

I have a question of operators, I want to perform a complex operation. Is it possible to make it so that I may check if a number is the multiple of something, such as, is this number a multiple of 3, meaning 6, 9, 12, etc?

URL: http://forum.audiogames.net/viewtopic.php?pid=204926#p204926




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-14 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

You could do the following for the menu callback. In this callback example, Ill call your dynamic_menu object just menu.int menu_callback (dynamic_menu@ menu, string data){if (key_pressed(KEY_SPACE)){// code here...}// make the menu continue if the if statement does not return any value.return 0;}then, in the menu code:menu.set_callback(menu_callback, );HTH

URL: http://forum.audiogames.net/viewtopic.php?pid=204794#p204794




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-14 Thread AudioGames . net Forum — Developers room : audiogames . net fan via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

@ethin I have already designed a callback and sent it to Colton.

URL: http://forum.audiogames.net/viewtopic.php?pid=204818#p204818




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-14 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

thank you all. Well, as you might know if you guys read my threads, target 1. is out!http://coltonhill01.x10.mx/downloads/Ta … taller.exeEnjoy!

URL: http://forum.audiogames.net/viewtopic.php?pid=204850#p204850




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-10 Thread AudioGames . net Forum — Developers room : lukas via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Right now, it might be a bit easier and faster for you to simply edit the while loop of the run_extended method of the dynamic_menu include script itself, adding the spacebar press check directly, rather than figuring out the callback stuff. Just a tip.Lukas

URL: http://forum.audiogames.net/viewtopic.php?pid=204330#p204330




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-10 Thread AudioGames . net Forum — Developers room : audiogames . net fan via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Callbacks really arent that hard, at least they werent for me. But, I also had been learning bgt for 2 and a half months before even looking at them.

URL: http://forum.audiogames.net/viewtopic.php?pid=204351#p204351




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-09 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

It plays, now I want a preview function. Um, I need a callback for that so I can press space, and itll play the sound.

URL: http://forum.audiogames.net/viewtopic.php?pid=204259#p204259




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-07 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Hm. I was under the impression that n=-1 was for escape. You can just change this line:n=menu.run()-1;You could do it with a sound object, yeah. Are you wanting to use one sound object, or do you want one for each sound?You would just need to declare a sound object outside of the loop (or globally, if you want to reuse it elsewhere), and replace the sound pool lines with this:(replace snd with the name of your sound object)snd.stop();snd.load(files[n]);snd.play();Its important to declare the sound object outside of the loop, otherwise it will be destroyed before it finishes playing, unless you use play_wait.If you instead want an array to match the filenames, you could create one and initialize it in the same for loop that sets up the menu. In that case, youd just call sounds[n].play() in place of the pool shenanigans.

URL: http://forum.audiogames.net/viewtopic.php?pid=203965#p203965




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-06 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

And I kinda wanna use a sound object, as this target game is sound pool based, but I never use play stationery, instead I use sound objects. I know, Im stupid. Thats probably not the way to go. i would not like converting all those sounds from object to pool, as Id have to rewrite half the game and that thing is already getting huge. I want it to return a filename as a string, and load that into memory. Also, I would like to choose if it should play_wait or just play from the menu, like you select the sound, it loads it, plays it, and asks if it should play wait or play and if you answer play wait, it waits when you shoot. Otherwise, it just plays. I know how to do that, just a bit more if statements. I just need it to play and load the right file, with a sound object. Thank you, sorry if Im bothering anyone.

URL: http://forum.audiogames.net/viewtopic.php?pid=203809#p203809




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-06 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

works! I did a bit of editing, but it works! Now, heres my question. It indeed adds the items, but the problem is that it basses them on 0, so if I press escape it plays the first sound, and every sound is one ahead. Is there a way to fix this? I do know that arays are 0 based, but can you fix this bug with some kind of math?

URL: http://forum.audiogames.net/viewtopic.php?pid=203808#p203808




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-02 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Ah.Try this?(Havent actually tested it):sound_pool pool;
string[] files=find_files(sounds/*);
int n=0;
dynamic_menu menu;
for(uint i=0; ifiles.length(); i++) {
menu.add_item_tts(files[i]);
}
while(n=0) {
n=menu.run();
if(n=0 and nfiles.length()) {
pool.destroy_all(); // Unnecessary, but I find letting sounds overlap when I do this to be annoying at best.
pool.play_stationary(sounds/ + files[n], false);
}

}

URL: http://forum.audiogames.net/viewtopic.php?pid=203360#p203360




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-02-01 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

I tried that and it said it couldnt return that. Ive got menuX, maybe I can just add a counter and count up the aray.

URL: http://forum.audiogames.net/viewtopic.php?pid=203305#p203305




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-30 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

You could use a for loop to add each file to the menu.What I did when I wanted a sound browser was take my file browser and change it so that pressing enter on a file would play it instead of returning. I dont have that program on this computer, else Id just upload it for people to play with.

URL: http://forum.audiogames.net/viewtopic.php?pid=202999#p202999




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-30 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

You could use a for loop to add each file to the menu.What I did when I wanted a sound browser was take my file browser and change it so that pressing enter on a file would play it instead of returning. I dont have that program on this computer, else Id just upload it for people to play with.

URL: http://forum.audiogames.net/viewtopic.php?pid=202999#p202999




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-30 Thread AudioGames . net Forum — Developers room : keyIsFull via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

if youre using dynamic_menu, the ad_item_tts function returns a string, which basically means you can just use the array created by find_files.

URL: http://forum.audiogames.net/viewtopic.php?pid=203030#p203030




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-30 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

so I could create the aray to find files in that directory, then I could use a for loop to say as long as this counter is less than the length of this aray, add a menu item. My question is, how in the hell and I going to make it speak filenames, such as default.ogg, rifle.wav or laser.ogg.

URL: http://forum.audiogames.net/viewtopic.php?pid=203023#p203023




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-29 Thread AudioGames . net Forum — Developers room : ogomez92 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

why not just program your own pack generator? Its easy. The way I do it in my game, if you are using a debug version (I.e: source code or compile debug... it will generator. Otherwise, it will open the pack. This is a one-time and forget thing.

URL: http://forum.audiogames.net/viewtopic.php?pid=202799#p202799




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-29 Thread AudioGames . net Forum — Developers room : coltonhill01 via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Im sorry, Im kinda new to bgt, and I can barely use arays right now. Heres what I would like to do, for my game. This is target. I want to have a folder called guns in the sounds folder, sounds/guns. I want there to be a select gun sound option, and if you click it, it will browse sounds/guns with find files, return it as an aray, now how do I bring that aray into a dynamic menu with each item as a sound file? For example, default.ogg, rifle.wav, all in the menu.

URL: http://forum.audiogames.net/viewtopic.php?pid=202876#p202876




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-27 Thread AudioGames . net Forum — Developers room : burak via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Hi, why cant we add a folder at once to a pack? Also, for example, if we had multiple tpyes of a sound, for example, we have 6 voice folders and all of them has hi.wav, how do we seperate those from eachother? Thank you.

URL: http://forum.audiogames.net/viewtopic.php?pid=202647#p202647




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-27 Thread AudioGames . net Forum — Developers room : keyIsFull via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

I thought the file browser returned either a file object or a string containing the file path. So you just pass that as a parameter to the browse_pack function. In the function youd ask the user for the deryption key, then youd use the list_files method to turn an array containing the files. Create a menu, create the if statements to check if the file is a sound or not, and voila.

URL: http://forum.audiogames.net/viewtopic.php?pid=202644#p202644




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-27 Thread AudioGames . net Forum — Developers room : keyIsFull via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

I thought the file browser returned either a file object or a string containing the file path. So you just pass that as a parameter to the browse_pack function. In the function youd ask the user for the deryption key, then youd use the list_files method to turn an array containing the files. Create a menu, create the if statements to check if the file is a sound or not, and voila.Not sure why you would want the pack in the same file/folder browsing mode. It seems kind of impractical to meAlso you mention keeping the same file/folder structure? There is no such thing as a file/folde structure in a pack file.

URL: http://forum.audiogames.net/viewtopic.php?pid=202644#p202644




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: BGT pack stuff and custom classes and functions

2015-01-27 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: BGT pack stuff and custom classes and functions

Packs use arbitrary strings to identify files. These can have the same syntax as file/folder paths, but thats purely for convenience.I dont remember if theres a way to get all the contents of a pack without extracting everything. But once you have the contents, either directly or through extraction, browsing through them and playing them is trivial.It might be problematic in terms of preserving the folder structure, though.

URL: http://forum.audiogames.net/viewtopic.php?pid=202654#p202654




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector