‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_bot_koth.gsc
Go to the documentation of this file.
1 #using scripts\shared\array_shared;
2 #using scripts\shared\math_shared;
3 #using scripts\shared\util_shared;
4 
5 #insert scripts\shared\shared.gsh;
6 
7 #using scripts\shared\bots\_bot;
8 #using scripts\shared\bots\_bot_combat;
9 #using scripts\mp\bots\_bot;
10 #using scripts\mp\bots\_bot_combat;
11 
12 #insert scripts\mp\bots\_bot.gsh;
13 
14 #namespace bot_koth;
15 
16 function ‪init()
17 {
18  level.onBotSpawned = &‪on_bot_spawned;
19  level.botUpdateThreatGoal = &‪bot_update_threat_goal;
20  level.botIdle = &‪bot_idle;
21 }
22 
24 {
25  self thread ‪wait_zone_moved();
26 
28 }
29 
31 {
32  self endon( "death" );
33  level endon( "game_ended" );
34 
35  while(1)
36  {
37  level waittill( "zone_moved" );
38 
39  if ( !self ‪bot_combat::has_threat() && self BotGoalSet() )
40  {
41  self BotSetGoal( self.origin );
42  }
43  }
44 }
45 
47 {
48  if ( isdefined( level.zone ) && self IsTouching( level.zone.gameobject.trigger ) )
49  {
50  if ( self BotGoalReached() )
51  {
52  self ‪bot::path_to_point_in_trigger( level.zone.gameobject.trigger );
53  }
54  return;
55  }
56 
58 }
59 
60 function ‪bot_idle()
61 {
62  if ( isdefined( level.zone ) )
63  {
64  if ( self IsTouching( level.zone.gameobject.trigger ) )
65  {
66  self ‪bot::path_to_point_in_trigger( level.zone.gameobject.trigger );
67  }
68  else
69  {
70  self ‪bot::approach_goal_trigger( level.zone.gameobject.trigger );
72  }
73  return;
74  }
75 
76  self ‪bot::bot_idle();
77 }
‪on_bot_spawned
‪function on_bot_spawned()
Definition: _bot_koth.gsc:23
‪has_threat
‪function has_threat()
Definition: _bot_combat.gsc:93
‪init
‪function init()
Definition: _bot_koth.gsc:16
‪approach_goal_trigger
‪function approach_goal_trigger(trigger, radiusMax, spacing)
Definition: _bot.gsc:1068
‪bot_update_threat_goal
‪function bot_update_threat_goal()
Definition: _bot_koth.gsc:46
‪path_to_point_in_trigger
‪function path_to_point_in_trigger(trigger)
Definition: _bot.gsc:515
‪bot_idle
‪function bot_idle()
Definition: _bot_koth.gsc:60
‪wait_zone_moved
‪function wait_zone_moved()
Definition: _bot_koth.gsc:30
‪update_threat_goal
‪function update_threat_goal()
Definition: _bot_clean.gsc:158
‪sprint_to_goal
‪function sprint_to_goal()
Definition: _bot.gsc:454