Re: Error in BGT

2016-11-09 Thread AudioGames . net Forum — Developers room : lukas via Audiogames-reflector


  


Re: Error in BGT

Sorry, my original answer was a bit rushed, but what I meant was that you have the following loop:for(int i=0; i<5; i++){enemies(i).e.destroy_all();enemies.remove_at(i);}It should look like this instead:for(int i=0; i<5; i++){enemies(0).e.destroy_all();enemies.remove_at(0);}Can you tell why?Also, do you really need to use a separate sound pool for every enemy instance? That's probably not a good idea in most cases.Lukas

URL: http://forum.audiogames.net/viewtopic.php?pid=285291#p285291





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

Re: Error in BGT

2016-10-31 Thread AudioGames . net Forum — Developers room : springrosqdp via Audiogames-reflector


  


Re: Error in BGT

If you don't want to spend a fortune opening cases, there is another option to get keys. Using Free CSGO Ak47 Skins you can get CS:GO keys for taking surveys online. Later on, you'll be able to buy/trade for keys easily with your profits, but this site is great if you're just starting out or don't want to spend your profits on keys. Usually it's better to just buy the skins you want instead of opening cases, but we all know how addicting it is.I read what you published, I recently played a game and you want to share with you.

URL: http://forum.audiogames.net/viewtopic.php?pid=284717#p284717





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

Re: Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Re: Error in BGT

You can give an example?Array I have written is correct?

URL: http://forum.audiogames.net/viewtopic.php?pid=284605#p284605





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

Re: Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : lukas via Audiogames-reflector


  


Re: Error in BGT

Try decrementing the counter ("i--;") in the for loop where you destroy enemy sounds. I mean the very first for loop right at the top when escape is pressed.Lukas

URL: http://forum.audiogames.net/viewtopic.php?pid=284603#p284603





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

Re: Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Re: Error in BGT

Main file:sound_pool s;int x=1;int hp;timer step;enemy@[] enemies(0);void main(){show_game_window("Warrior Adventure");set_sound_decryption_key("ILoveKids", true);set_sound_storage("sounds.dat");install_keyhook();wait(1000);dlgplay("logo.wav");wait(500);mainmenu();}void l1(){dlgplay("l1.wav");s.play_stationary("ambiant1.wav", true);hp=100;for(int i=0; i<5; i++){enemy enemy1();enemies.insert_at(i, enemy1);enemies(i).speak();}while(true){for(int i=0; i<5; i++){enemies(i).move();enemies(i).fire();enemies(i).die();}if(key_down(KEY_LEFT) and step.elapsed>300 and x>1){x-=1;s.play_stationary("step1_"+random(1, 3)+".ogg", false);step.restart();}if(ke
 y_down(KEY_RIGHT) and step.elapsed>300 and x<150){x+=1;s.play_stationary("step1_"+random(1, 3)+".ogg", false);step.restart();}if(key_pressed(KEY_ESCAPE)){s.destroy_all();for(int i=0; i<5; i++){enemies(i).e.destroy_all();enemies.remove_at(i);}mainmenu();}if(key_pressed(KEY_C)){speak(x);}if(key_pressed(KEY_H)){speak(hp);}if(hp<=0){for(int i=0; i<5; i++)enemies.remove_at(i);s.destroy_all();dlgplay("k"+random(1,4)+".wav");mainmenu();}if(key_pressed(KEY_SPACE)){s.play_stationary("pistol.wav", false);for(int i=0; i<5; i++){if(absolute(x-enemies(i).position)<=5){s.play_1d("pain"+random(1,15)+".wav", x, enemies(i).position, false);enemies(i).health-=random(15,30);}}}s.update_listener_1d(x);wait(5);}}void test(){dlgplay("test.wav");}

URL: http://forum.audiogames.net/viewtopic.php?pid=284592#p284592





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

Re: Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Re: Error in BGT

Main file:sound_pool s;int x=1;int hp;timer step;enemy@[] enemies(0);void main(){show_game_window("Warrior Adventure");set_sound_decryption_key("ILoveKids", true);set_sound_storage("sounds.dat");install_keyhook();wait(1000);dlgplay("logo.wav");wait(500);mainmenu();}void l1(){dlgplay("l1.wav");s.play_stationary("ambiant1.wav", true);hp=100;for(int i=0; i<5; i++){enemy enemy1();enemies.insert_at(i, enemy1);enemies(i).speak();}while(true){for(int i=0; i<5; i++){enemies(i).move();enemies(i).fire();enemies(i).die();enemies(i).update();}if(key_down(KEY_LEFT) and step.elapsed>300 and x>1){x-=1;s.play_stationary("step1_"+random(1, 3)+".ogg", false);step.re
 start();}if(key_down(KEY_RIGHT) and step.elapsed>300 and x<150){x+=1;s.play_stationary("step1_"+random(1, 3)+".ogg", false);step.restart();}if(key_pressed(KEY_ESCAPE)){s.destroy_all();for(int i=0; i<5; i++){enemies(i).e.destroy_all();enemies.remove_at(i);}mainmenu();}if(key_pressed(KEY_C)){speak(x);}if(key_pressed(KEY_H)){speak(hp);}if(hp<=0){for(int i=0; i<5; i++)enemies.remove_at(i);s.destroy_all();dlgplay("k"+random(1,4)+".wav");mainmenu();}if(key_pressed(KEY_SPACE)){s.play_stationary("pistol.wav", false);for(int i=0; i<5; i++){if(absolute(x-enemies(i).position)<=5){s.play_1d("pain"+random(1,15)+".wav", x, enemies(i).position, false);enemies(i
 ).health-=random(15,30);}}}s.update_listener_1d(x);wait(5);}}void test(){dlgplay("test.wav");}

URL: http://forum.audiogames.net/viewtopic.php?pid=284592#p284592





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

Re: Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Re: Error in BGT

class enemy{int health;int speed;int position;bool died;sound_pool e;timer steper;timer firer;enemy(){health=100;speed=300;position=random(30,150);died=false;}void move(){if(died==false){if(position<x){if (steper.elapsed>speed){e.play_1d("step1_"+random(1,3)+".ogg", x, position, false);position++;steper.restart();}}if(position>x){if (steper.elapsed>speed){e.play_1d("step1_"+random(1,3)+".ogg", x, position, false);position--;steper.restart();void speak(){if(died==false){e.play_1d("voice"+random(1,9)+".wav", x, position, true);}}void fire(){if(died==false){if(absolute(x-position)<=5){if(firer.
 elapsed>800){e.play_1d("pistol.wav", x, position, false);hp-=random(15,30);firer.restart();void die(){if(died==false){if(health<=0){died=true;e.destroy_all();e.play_1d("die"+random(1,24)+".wav", x, position, false);position=-50;

URL: http://forum.audiogames.net/viewtopic.php?pid=284590#p284590





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

Error in BGT

2016-10-30 Thread AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector


  


Error in BGT

Hi all.In two cases, the error appears in the game.Code:if (key_pressed (KEY_ESCAPE)){s.destroy_all ();for (int i = 0; i <5; i ++){enemies (i) .e.destroy_all ();enemies.remove_at (i);}mainmenu ();}Error:Call stack size: 3File: D: \ Warrior Adventure \ game.bgtLine: 60 (1)Function: void l1 ()File: D: \ Warrior Adventure \ includes \ menu.bgtLine: 24 (1)Function: void mainmenu ()File: D: \ Warrior Adventure \ game.bgtLine: 21 (1)Function: void main ()Code:if (hp <= 0){for (int i = 0; i <5; i ++)enemies.remove_at (i);s.destroy_all ();dlgplay ( "k" + random (1,4) + "wav.");mainmenu ();}Error:Call stack size: 4File: D: \ Warrior Adventure \ game.bgtLine: 75 (19)Function: void l1 ()File: D: \ Warrior Adventure \ includes \ menu.
 bgtLine: 24 (1)Function: void mainmenu ()File: D: \ Warrior Adventure \ includes \ menu.bgtLine: 30 (1)Function: void mainmenu ()File: D: \ Warrior Adventure \ game.bgtLine: 21 (1)Function: void main ()[] Replaced by (), as the forum does not accept.Help me please!

URL: http://forum.audiogames.net/viewtopic.php?pid=284589#p284589





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