Re: bgt three questions
Perhaps add a timer as a property?
timer time;
then the movement function looks like this, assuming you have a variable called player_position:
void move() {
if(time.elapsed>=speed) {
if(position>player_position) position--;
else position++;
pool.play_1d("sounds/step.wav", player_position, position, false);
time.restart();
time.resume();
}
}
For that to work, you will need, somewhere outside the enemy class:
int player_position=0;
sound_pool pool;
And for the sound_pool to work, you must include it, with something like this at hte top of the script:
#include "sound_pool.bgt"
You mentioned menus with sound. The dynamic_menu can do this, and it, too, must be included, like so:
#include "dynamic_menu.bgt"
I can try to explain or comment on the above, if you like. (I'd do it now, but am in a hurry.)
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector