Re: please help me with my bgt code.

2020-08-29 Thread AudioGames . net Forum — Developers room : Yukie via Audiogames-reflector


  


Re: please help me with my bgt code.

i all ready moved my home/end checks out of the for loop. but, the background volume is still not working. i not understand the error with my code.

URL: https://forum.audiogames.net/post/565394/#p565394




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


Re: please help me with my bgt code.

2020-08-28 Thread AudioGames . net Forum — Developers room : cartertemm via Audiogames-reflector


  


Re: please help me with my bgt code.

Try moving your home/end checks out of the for loop, on the same level as:if(key_pressed(KEY_ESCAPE))There is indeed a more efficient way that doesn't insist on repeating the same line a bunch of times for each keypress.Each of the KEY_* constants are integers. If memory serves:int KEY_1 = 2
int KEY_2 = 3;
// ...
int KEY_5 = 6;


int KEY_Q = 16;
int KEY_W = 17;
// ...
int KEY_T = 20;Meaning you could theoretically get a list of currently pressed keys with keys_pressed and check if between 2 and 6 (for the number row) or 16 and 20 (for letters).If the former, use b[key-2]. If the former, l[key-16].

URL: https://forum.audiogames.net/post/565334/#p565334




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


please help me with my bgt code.

2020-08-28 Thread AudioGames . net Forum — Developers room : Yukie via Audiogames-reflector


  


please help me with my bgt code.

hi. i have a problem in my code. i insert the prior and next as a background volume keys. but, the problem is, the volume is not working. and, there is a better way to do this in bgt?sorry for my english. its not my native language.here is my code.#include "includes/key_hold.bgt"
double musvol;
int minvol=0;
int maxvol=100;
int volumespeed=70;
int keyspeed=300;
key_hold kprior(KEY_PRIOR,keyspeed,volumespeed);
key_hold knext(KEY_NEXT,keyspeed,volumespeed);
key_hold khome(KEY_HOME,keyspeed,volumespeed);
key_hold kend(KEY_END,keyspeed,volumespeed);
sound[] l(5);
sound[] b(5);
void main()
{
show_game_window("background and effects");
for (uint i=0; i-60)
{
set_sound_master_volume(get_sound_master_volume()-1);
}
}
if(key_pressed(KEY_ESCAPE))
{
exit();
}
}
}thanks.

URL: https://forum.audiogames.net/post/565243/#p565243




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