bgt, I nead a litil help
ok so, this thing is only for testing, and I incounterd a stupiddedy from me, or the bgt engen
i'm not pro with bgt yet, so from time to time I get some stupid things
i'll share inportent parts of the code and my question
code
class helper
{
int randx=15;
int twalktime=500;
int shoottime=random(100,500);
int blood=random(0,30);
int rande=random(1,10);
int x, y;
timer shoottimer,trtimer;
string tile;
helper(int hx, int hy)
{
x=hx;
y=hy;
}
void where()
{
if (map.exists(x+":"+y))
{
map.get(x+":"+y,tile);
}
}
} this is a part, now i'll share the helper walking code void twalk() { for (uint i=0; i<helpers.length(); i++) { if (helpers[i].y<=helpers[i].randx) { helpers[i].y+=1; helpers[i].where(); tp.play_2d(helpers[i].tile+"step"+random(1,5)+".ogg",me.x,me.y,helpers[i].x,helpers[i].y,false); } else if (helpers[i].y>=helpers[i].randx) { helpers[i].y-=1; helpers[i].where(); tp.play_2d(helpers[i].tile+"step"+random(1,5)+".ogg",me.x,me.y,helpers[i].x,helpers[i].y,false); } if (helpers[i].x<=helpers[i].randx) { helpers[i].x+=1; helpers[i].where(); tp.play_2d(helpers[i].tile+"step"+random(1,5)+".ogg",me.x,me.y,helpers[i].x,helpers[i].y,false); } else if (helpers[i].x>=helpers[i].randx) { helpers[i].x-=1; helpers[i].where(); tp.play_2d(helpers[i].tile+"step"+random(1,5)+".ogg",me.x,me.y,helpers[i].x,helpers[i].y,false); } } }
//
the question is, the hole thing is not working, helpers will walk, but they will freak out and starting move at the same tile and making a lot of noiz and just stops the script from responding, well I have a way around that, which I did in idiotic sandbox, but the way will make them all walk to the same spot, this one I hoped them to walk each one to a random spot but meh, oh I know I set randx to 15 but I did that in perpis,
doo note i'm useing it only for testing my skills before scrooing up my origenel games
but I want to know what's rong here to lirn, i'm sorry if i'm too stupid or the silootion is already at the bgt chm file
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector