Re: bgt, I nead a litil help

2020-04-06 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

Well it should restart the timer because I told it in the code to do so

URL: https://forum.audiogames.net/post/516581/#p516581




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: bgt, I nead a litil help

If they freak out, chances are you are not restarting their timer. You should do so regardless of them moving.

URL: https://forum.audiogames.net/post/516520/#p516520




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

ok, so I just saw that, they will start freak out and freaz the game because of tuns of movement at only 1 tile is when they reach there destenation which is randxdoes that makes sense somehow?

URL: https://forum.audiogames.net/post/516487/#p516487




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

well what i did when incountering this problom is kinda simeller
I made a timer which when reach 5 sekinds, it will change randx to a random plase around the map, forsing helpers[i] to go to it, making in infenit loop

URL: https://forum.audiogames.net/post/516450/#p516450




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector


  


Re: bgt, I nead a litil help

If you want that, do something similar toif (walk_timer.elapsed >= 500) {walk_timer.restart();int direction = random(1, 4);// depending on the number it generates it moves in a different direction, just basic if statements// code for walls and things, herehth

URL: https://forum.audiogames.net/post/516443/#p516443




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

oh yeah and I wanted them to walk freely around the map, not pitrole a small area

URL: https://forum.audiogames.net/post/516433/#p516433




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

well my problom is not with the spead, also, I have completely no idea about those lines you sedx+=sin(angle*pi/180);y+=cos(angle*pi/180);is this eavin bgt? sorry but i'm stupid but I dont there are in the chm file, could you explane a litil a litil bit more

URL: https://forum.audiogames.net/post/516422/#p516422




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector


  


Re: bgt, I nead a litil help

Hi there,well, I guess you wanted to set them a path, on which they would patrol from one end to another and back didn't you?It's quite logical that they freeze on one point. They have a x coordinate for example, which you're increasing by 1 until it crosses randx.Then it jumps to the second condition, which decreases the x coordinate in case that it's further than randx.But just think, by doing so, you again end up on randx, thus the condition:if (helpers[i].x<=randx)is true again and the x coordinate will increase. Second condition:if (helpers[i].x>=randx)activates, decreasing x by 1, ending up on randx, activating the first condition and that goes in a loop for ever and ever.You need to take a completely different approach, for example using:x+=sin(angle*pi/180);y+=cos(angle*pi/180);Where angle will be some randomly or semyrandomly set angle, which your characters will follow until hitting patrolling borders.You can use orthogonal movement as well of course, but you still need some way of controlling direction to avoid the stucking problem you face right now.As for the speed, that depends on the code, which is responsible for calling the movement method, you didn't include it here, so it's not possible to tell, where exactly the problem is.Best regardsRastislav

URL: https://forum.audiogames.net/post/516421/#p516421




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


Re: bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


Re: bgt, I nead a litil help

oh yeah and its not a timer problom, I set it so if a timer reach 500, it calls twalk()

URL: https://forum.audiogames.net/post/516333/#p516333




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


bgt, I nead a litil help

2020-04-05 Thread AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector


  


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 thingsi'll share inportent parts of the code and my questioncodeclass 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[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 gamesbut 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

URL: https://forum.audiogames.net/post/516332/#p516332




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