Re: BGT confusion

2015-03-22 Thread AudioGames . net ForumDevelopers room : jsymes via Audiogames-reflector


  


Re: BGT confusion

*crosses his fingers* Thanks. Now Im trying to take what I find in that scan and place it into a dynamic menu. Something tells me this could be very interesting! 

URL: http://forum.audiogames.net/viewtopic.php?pid=209395#p209395




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

BGT confusion

2015-03-22 Thread AudioGames . net ForumDevelopers room : jsymes via Audiogames-reflector


  


BGT confusion

Im working on what I hope will be a much larger game, but Im having some issues. Ive got a unit set on a 1000 by 1000 map, and I want my unit to be able to do a 360-degree scan of his surroundings to a distance of 10 units, but Im not entirely sure how to code this out. I have the feeling that two for loops then checking the value of my array is something to do with it. Maybe something likefor(int x=playerx-10; x=playerx+10; x++){for(int y=playery-10; y=playery+10; y++){//values greater than 0 are what i use for my unitsif(galaxy[x][y]0) {//code to add this unit to dynamic_menu goes here;}}}Does that sound about right? Im still pretty shakey on programming in general, and with BGT in particular. Thanks for any thoughts.

URL: http://forum.audiogames.net/viewtopic.php?pid=209390#p209390




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

Re: BGT confusion

2015-03-22 Thread AudioGames . net ForumDevelopers room : jsymes via Audiogames-reflector


  


Re: BGT confusion

Ok, Ive come across a bit of a problem with the menus Im working on. When the user starts up my game, theyre plopped down in a list of the ships theyre able to command, 5 in total. When the player arrows down and hits enter on the ship, it then brings up the correct captain menu thus far. However, when a person hits escape or the return to fleet (admirals) menu item, it kicks them clean out of the game, and I cant figure out why. Heres the two functions:void fleetmenu(){dynamic_menu admiral_menu;admiral_menu.add_click_sound(sounds/menuclick.wav);admiral_menu.add_enter_sound(sounds/federation_computer2.ogg);admiral_menu.allow_escape = true;admiral_menu.wrap = true;admiral_menu.add_item_tts(Command Enterprise);admiral_menu.add_item_tts(Command Lexington);admiral_menu.add_item_tts(Command Defiant);admiral_menu.add_item
 _tts(Command Hood);admiral_menu.add_item_tts(Command Intrepid);admiral_menu.add_item_tts(Quit game);int shipchoice=admiral_menu.run_extended(Fleet Menu,true,1,true);switch(shipchoice) {case 1:shipvalue=0;commandmenu();break;case 2:shipvalue=1;commandmenu();break;case 3:shipvalue=2;commandmenu();break;case 4:shipvalue=3;commandmenu();break;case 5:shipvalue=4;commandmenu();break;case 6:voice.speak_wait(Thank you for playing.);exit();}}void commandmenu(){dynamic_menu captain_menu;captain_menu.add_click_sound(sounds/menuclick.wav);captain_menu.add_enter_sound(sounds/federation_computer2.ogg);captain_menu.allow_escape = true;captain_menu.wrap = true;captain_menu.add_item_tts(Course
 );captain_menu.add_item_tts(Warp Drive);captain_menu.add_item_tts(Short-range scan);captain_menu.add_item_tts(Long-range scan);captain_menu.add_item_tts(Phasers);captain_menu.add_item_tts(Photon Torpedos);captain_menu.add_item_tts(Briefing);captain_menu.add_item_tts(Return to Fleet Menu);int orderchoice;do{orderchoice = captain_menu.run(fed_shipname[shipvalue] + Captain Menu, true);if(orderchoice==1) {voice.speak(not implemented);//coursemenu(shipvalue);}else if(orderchoice==2) {voice.speak(not implemented);//speedmenu(shipvalue);}else if(orderchoice==3) {voice.speak(not implemented);//shortscan(shipvalue);}else if(orderchoice==4) {voice.speak(not implemented);//longscan(shipvalu
 e);}else if(orderchoice==5) {voice.speak(not implemented);//phaserlock(shipvalue);}else if(orderchoice==6) {voice.speak(not implemented);//photonlock(shipvalue);}else if(orderchoice==7) {voice.speak(not implemented);//briefing(shipvalue);}else if(orderchoice==8) {return;}}while(orderchoice!=0 and orderchoice!=9);return;}Afraid Im not a very good programmer in any language. 

URL: http://forum.audiogames.net/viewtopic.php?pid=209436#p209436




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

Re: BGT confusion

2015-03-22 Thread AudioGames . net ForumDevelopers room : jsymes via Audiogames-reflector


  


Re: BGT confusion

Would something like the do.while loop I used in the commandmenu work fine for the fleetmenu as well? It seemed that the do.while loop I used was a bit clumsy, which was why I tried the switch-case on the other menu instead. Maybe I was being too clever by half. 

URL: http://forum.audiogames.net/viewtopic.php?pid=209457#p209457




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