BGT confusion
I'm working on what I hope will be a much larger game, but I'm having some issues. I've 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 I'm 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 like
for(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 units
if(galaxy[x][y]>0) {
//code to add this unit to dynamic_menu goes here;
}
}
}
Does that sound about right? I'm still pretty shakey on programming in general, and with BGT in particular. Thanks for any thoughts.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector