added radiation

This commit is contained in:
INeedBots 2021-01-09 20:13:46 -06:00
parent eb0734dca3
commit 9eaf12bf2e

View File

@ -305,11 +305,11 @@ bot_spawn()
self thread bot_revive_think(); self thread bot_revive_think();
/*
//stockpile.gsc //stockpile.gsc
//hotel.gsc //hotel.gsc
//kowloon.gsc //kowloon.gsc
self thread bot_radiation_think();*/ self thread bot_radiation_think();
if (getDvarInt("bots_play_nade")) if (getDvarInt("bots_play_nade"))
self thread bot_use_equipment_think(); self thread bot_use_equipment_think();
@ -1429,6 +1429,64 @@ bot_revive_think()
} }
} }
/*
Presses the buttons on radiation
*/
bot_radiation_think()
{
self endon( "death" );
self endon( "disconnect" );
level endon ( "game_ended" );
if ( level.script != "mp_radiation" )
return;
if ( level.wagerMatch )
return;
origins = [];
origins[0] = ( 813, 5, 267 );
origins[1] = ( -811, 30, 363 );
for ( ;; )
{
wait( RandomIntRange( 8, 15 ) );
if ( self HasScriptGoal() )
continue;
if ( self IsRemoteControlling() || self.bot_lock_goal )
continue;
if (self UseButtonPressed())
continue;
origin = random( origins );
if ( DistanceSquared( self.origin, origin ) < 512 * 512 )
{
self SetBotGoal( origin, 32 );
event = self waittill_any_return( "goal", "bad_path", "new_goal" );
if (event != "new_goal")
self ClearScriptGoal();
if(event == "bad_path")
continue;
self SetBotGoal( self.origin, 32 );
self PressUseButton( 3 );
wait( 3 );
self ClearScriptGoal();
}
wait( RandomIntRange( 5, 10 ) );
}
}
/* /*
Bots hang around the enemy's flag to spawn kill em Bots hang around the enemy's flag to spawn kill em
*/ */