This commit is contained in:
ineed bots
2023-07-13 14:58:54 -06:00
parent 65ad154eb6
commit 81e65a3adb
15 changed files with 271 additions and 3210 deletions

View File

@@ -5,57 +5,4 @@
init()
{
level thread maps\bots\_bot::init();
if ( getDvar( "player_debug_bots" ) == "" )
setDvar( "player_debug_bots", 1 );
thread test_bot_pathing();
}
test_bot_pathing()
{
if ( !getDvarInt( "player_debug_bots" ) )
return;
player = undefined;
while ( !isDefined( player ) || player is_bot() )
level waittill( "connected", player );
PrintConsole( "player has CMDS! " + player.playername );
player endon( "disconnect" );
while ( true )
{
wait 0.05;
if ( !player UseButtonPressed() )
continue;
bots = getBotArray();
if ( player AttackButtonPressed() )
{
player iprintln( "Telling bots to go to you" );
for ( i = 0; i < bots.size; i++ )
{
bots[i] SetScriptGoal( player.origin );
}
continue;
}
if ( player AdsButtonPressed() )
{
player iprintln( "Telling bots to ROAM" );
for ( i = 0; i < bots.size; i++ )
{
bots[i] ClearScriptGoal();
}
continue;
}
}
}