help with making auto pilot in my game

2019-09-07 Thread AudioGames . net Forum — Developers room : bopitmaster34 via Audiogames-reflector


  


help with making auto pilot in my game

Hi guys. So I have a game, and I am making autopilot mode. It is a game where you kill enemies, get potions, get gold, level up, and all that. The problem I am having with autopilot is when the player gets started walking right, he doesn't want to turn left when I hit the key to make him. Here is the code for it.bool autopil=false;if (key_pressed(KEY_LEFT) and autopil==true and facing==Right and me.x>0){p.play_stationary("turn.ogg",false);facing=Left;force_key_up(KEY_RIGHT);force_key_down(KEY_LEFT);}if (key_pressed(KEY_Z) and autopil==true){force_key_down(KEY_RIGHT);}if (key_pressed(KEY_RIGHT) and autopil==true and facing==Left){p.play_stationary("turn.ogg",false);facing=Right;force_key_up(KEY_LEFT);force_key_down(KEY_RIGHT);}

URL: https://forum.audiogames.net/post/460345/#p460345




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


Re: help with making auto pilot in my game

2019-09-07 Thread AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector


  


Re: help with making auto pilot in my game

there are those functions? you're ahead of me.

URL: https://forum.audiogames.net/post/460357/#p460357




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


Re: help with making auto pilot in my game

2019-09-11 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: help with making auto pilot in my game

the thing about auto pylit is that you are not suppost to do any thing.The game should basicly play it's self. so the best thing i could suggest you to do is to make a player class along with walking functions, aimbing, shooting and so on. the only thing you as a player is supposed to do when playing in auto pylit mode, is to press escape in the game to exit.

URL: https://forum.audiogames.net/post/461225/#p461225




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