‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
ai_shared.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\array_shared;
4 #using scripts\shared\colors_shared;
5 #using scripts\shared\flag_shared;
6 #using scripts\shared\flagsys_shared;
7 #using scripts\shared\scene_shared;
8 #using scripts\shared\util_shared;
9 #using scripts\shared\vehicle_ai_shared;
10 
11 #using scripts\shared\ai\systems\init;
12 #using scripts\shared\ai\systems\shared;
13 #using scripts\shared\ai\archetype_utility;
14 #using scripts\shared\ai\systems\weaponList;
15 #using scripts\shared\ai\systems\ai_interface;
16 
17 #insert scripts\shared\ai\systems\blackboard.gsh;
18 #insert scripts\shared\shared.gsh;
19 #insert scripts\shared\ai\utility.gsh;
20 
21 #namespace ai;
22 
33 function ‪set_ignoreme( val )
34 {
35  assert( IsSentient( self ), "Non ai tried to set ignoreme" );
36  self.ignoreme = val;
37 }
38 
49 function ‪set_ignoreall( val )
50 {
51  assert( isSentient( self ), "Non ai tried to set ignoraell" );
52  self.ignoreall = val;
53 }
54 
65 function ‪set_pacifist( val )
66 {
67  assert( IsSentient( self ), "Non ai tried to set pacifist" );
68  self.pacifist = val;
69 }
70 
80 function ‪disable_pain()
81 {
82  assert( isalive( self ), "Tried to disable pain on a non ai" );
83  self.allowPain = false;
84 }
85 
95 function ‪enable_pain()
96 {
97  assert( isalive( self ), "Tried to enable pain on a non ai" );
98  self.allowPain = true;
99 }
100 
110 function ‪gun_remove()
111 {
112  self ‪shared::placeWeaponOn( self.weapon, "none" );
113  self.gun_removed = true;
114 }
115 
127 function ‪gun_switchto( weapon, whichHand )
128 {
129  self ‪shared::placeWeaponOn( weapon, whichHand );
130 }
131 
141 function ‪gun_recall()
142 {
143  self ‪shared::placeWeaponOn( self.primaryweapon, "right" );
144  self.gun_removed = undefined;
145 }
146 
159 function ‪set_behavior_attribute( attribute, value )
160 {
161  if( ‪IS_BONUSZM )
162  {
163  if( ‪has_behavior_attribute( attribute ) )
164  ‪SetAiAttribute( self, attribute, value );
165  }
166  else
167  {
168  ‪SetAiAttribute( self, attribute, value );
169  }
170 }
171 
172 
184 function ‪get_behavior_attribute( attribute )
185 {
186  return ‪GetAiAttribute( self, attribute );
187 }
188 
198 function ‪has_behavior_attribute( attribute )
199 {
200  return ‪HasAiAttribute( self, attribute );
201 }
202 
211 {
212  if ( IsSentient( self ) && !IsAlive( self ) )
213  {
214  return true;
215  }
216  else
217  {
218  return false;
219  }
220 }
221 
233 function ‪waittill_dead( guys, num, timeoutLength )
234 {
235  // verify the living - ness of the ai
236  allAlive = true;
237  for( i = 0;i < guys.size;i++ )
238  {
239  if( isalive( guys[ i ] ) )
240  {
241  continue;
242  }
243  allAlive = false;
244  break;
245  }
246  assert( allAlive, "Waittill_Dead was called with dead or removed AI in the array, meaning it will never pass." );
247  if( !allAlive )
248  {
249  newArray = [];
250  for( i = 0;i < guys.size;i++ )
251  {
252  if( isalive( guys[ i ] ) )
253  {
254  newArray[ newArray.size ] = guys[ i ];
255  }
256  }
257  guys = newArray;
258  }
259 
260  ent = SpawnStruct();
261  if( isdefined( timeoutLength ) )
262  {
263  ent endon( "thread_timed_out" );
264  ent thread ‪waittill_dead_timeout( timeoutLength );
265  }
266 
267  ent.count = guys.size;
268  if( isdefined( num ) && num < ent.count )
269  {
270  ent.count = num;
271  }
272  array::thread_all( guys,&‪waittill_dead_thread, ent );
273 
274  while( ent.count > 0 )
275  {
276  ent waittill( "waittill_dead guy died" );
277  }
278 }
279 
292 function ‪waittill_dead_or_dying( guys, num, timeoutLength )
293 {
294  // verify the living - ness and healthy - ness of the ai
295  newArray = [];
296  for( i = 0;i < guys.size;i++ )
297  {
298  if( isalive( guys[ i ] ) && !guys[ i ].ignoreForFixedNodeSafeCheck )
299  {
300  newArray[ newArray.size ] = guys[ i ];
301  }
302  }
303  guys = newArray;
304 
305  ent = spawnStruct();
306  if( isdefined( timeoutLength ) )
307  {
308  ent endon( "thread_timed_out" );
309  ent thread ‪waittill_dead_timeout( timeoutLength );
310  }
311 
312  ent.count = guys.size;
313 
314  // optional override on count
315  if( isdefined( num ) && num < ent.count )
316  {
317  ent.count = num;
318  }
319 
320  array::thread_all( guys,&‪waittill_dead_or_dying_thread, ent );
321 
322  while( ent.count > 0 )
323  {
324  ent waittill( "waittill_dead_guy_dead_or_dying" );
325  }
326 }
327 
328 function private ‪waittill_dead_thread( ent )
329 {
330  self waittill( "death" );
331  ent.count-- ;
332  ent notify( "waittill_dead guy died" );
333 }
334 
336 {
337  self ‪util::waittill_either( "death", "pain_death" );
338  ent.count-- ;
339  ent notify( "waittill_dead_guy_dead_or_dying" );
340 }
341 
342 function ‪waittill_dead_timeout( timeoutLength )
343 {
344  wait( timeoutLength );
345  self notify( "thread_timed_out" );
346 }
347 
348 //internal function called by shoot_at_target. This will ensure that we start computing the duration of shoot_at_target only after the first shot
349 function private ‪wait_for_shoot()
350 {
351  self endon( "stop_shoot_at_target" );
352  if( IsVehicle( self ) )
353  {
354  self waittill( "weapon_fired" );
355  }
356  else
357  {
358  self waittill("shoot");
359  }
360  self.start_duration_comp = true;
361 }
362 
380 function ‪shoot_at_target( mode, target, tag, duration, setHealth, ignoreFirstShotWait )
381 {
382  self endon("death");
383  self endon("stop_shoot_at_target");
384 
385  Assert( IsDefined( target ), "shoot_at_target was passed an undefined target" );
386  Assert( IsDefined( mode ), "Undefined mode. A mode must be passed to shoot_at_target" );
387  mode_flag = ‪IS_EQUAL( mode, "normal" ) || ‪IS_EQUAL( mode, "shoot_until_target_dead" ) || ‪IS_EQUAL( mode, "kill_within_time" );
388  Assert( mode_flag, "Unsupported mode. 'Mode must be normal', 'shoot_until_target_dead' or 'kill_within_time'" );
389 
390  if( isdefined( duration ) )
391  {
392  Assert( duration >= 0, "Duration must be a zero or a positive quantity" );
393  }
394  else
395  {
396  duration = 0;
397  }
398 
399  if ( isdefined(setHealth) && isdefined(target) )
400  {
401  target.health = setHealth;
402  }
403 
404  if ( !isdefined( target ) || ( ( ‪IS_EQUAL( mode, "shoot_until_target_dead" ) ) && ( target.health <= 0 ) ) )
405  {
406  return; // undefined target or target already dead
407  }
408 
409  if( IsDefined(tag) && tag != "" )
410  {
411  self SetEntityTarget( target, 1, tag );
412  }
413  else
414  {
415  self SetEntityTarget( target, 1 );
416  }
417 
418  // make sure the AI shoots it, even if not visible
419  self.cansee_override = true;
420  self.start_duration_comp = false;
421 
422  switch( mode )
423  {
424  case "normal":
425  break;
426  case "shoot_until_target_dead":
427  duration = -1;
428  break;
429  case "kill_within_time":
430  target DamageMode( "next_shot_kills" );
431  break;
432  }
433 
434  if( IsVehicle( self ) )
435  {
436  // Reset vehicle firing cool downs so we can fire right away
438  }
439 
440  // wait for first shot
441 
442  if(ignoreFirstShotWait === true)
443  {
444  self.start_duration_comp = true;
445  }
446  else
447  {
448  self thread ‪wait_for_shoot();
449  }
450 
451  // fire for duration
452  if( isdefined(duration) && isdefined( target ) && target.health > 0 )
453  {
454  if( duration >= 0)
455  {
456  elapsed = 0;
457  while( isdefined(target) && target.health > 0 && elapsed <= duration )
458  {
459  elapsed += 0.05;
460  if( !‪IS_TRUE( self.start_duration_comp ) )
461  elapsed = 0;
463  }
464 
465  if( isdefined(target) && mode == "kill_within_time" )
466  {
467  self.perfectaim = true;
468  self.aim_set_by_shoot_at_target = true;
469 
470  target waittill( "death" );
471  }
472  }
473  else if (duration == -1)
474  {
475  target waittill( "death" );
476  }
477  }
478 
480 }
481 
492 {
493  self ClearEntityTarget();
494 
495  if( ‪IS_TRUE( self.aim_set_by_shoot_at_target ) )
496  {
497  self.perfectaim = false;
498  self.aim_set_by_shoot_at_target = false;
499  }
500 
501  self.cansee_override = false;
502 
503  self notify("stop_shoot_at_target");
504 }
505 
507 {
508  self endon( "death" );
509  while ( self.isSpeaking )
510  {
512  }
513 }
514 
527 function ‪set_goal( value, key = "targetname", b_force = false )
528 {
529  goal = GetNode( value, key );
530 
531  if ( isdefined( goal ) )
532  {
533  self SetGoal( goal, b_force );
534  }
535  else
536  {
537  goal = GetEnt( value, key );
538 
539  if ( isdefined( goal ) )
540  {
541  self SetGoal( goal, b_force );
542  }
543  else
544  {
545  goal = ‪struct::get( value, key );
546 
547  if ( isdefined( goal ) )
548  {
549  self SetGoal( goal.origin, b_force );
550  }
551  }
552  }
553 
554  return goal;
555 }
556 
570 function ‪force_goal( goto, n_radius, b_shoot = true, str_end_on, b_keep_colors = false, b_should_sprint = false )
571 {
572  self endon( "death" );
573  s_tracker = SpawnStruct();
574  self thread ‪_force_goal( s_tracker, goto, n_radius, b_shoot, str_end_on, b_keep_colors, b_should_sprint );
575  s_tracker waittill( "done" );
576 }
577 
578 function ‪_force_goal( s_tracker, goto, n_radius, b_shoot = true, str_end_on, b_keep_colors = false, b_should_sprint = false )
579 {
580  self endon( "death" );
581 
582  self notify( "new_force_goal" );
583 
584  ‪flagsys::wait_till_clear( "force_goal" ); // let any previous force goal thread cleanup first
585  ‪flagsys::set( "force_goal" );
586 
587  goalradius = self.goalradius;
588  if ( IsDefined( n_radius ) )
589  {
590  Assert( ( IsFloat( n_radius ) || IsInt( n_radius ) ), "ai_shared::force_goal expects n_radius to be an int or a float." );
591  self.goalradius = n_radius;
592  }
593 
594  color_enabled = false;
595  if ( !b_keep_colors )
596  {
597  if ( IsDefined( ‪colors::get_force_color() ) )
598  {
599  color_enabled = true;
600  self ‪colors::disable();
601  }
602  }
603 
604  allowpain = self.allowpain;
605  ignoreall = self.ignoreall;
606  ignoreme = self.ignoreme;
607  ignoresuppression = self.ignoresuppression;
608  grenadeawareness = self.grenadeawareness;
609 
610  if ( !b_shoot )
611  {
612  self ‪set_ignoreall( true );
613  }
614 
615  if( b_should_sprint )
616  {
617  self ‪set_behavior_attribute( "sprint", true );
618  }
619 
620  self.ignoresuppression = true;
621  self.grenadeawareness = 0;
622  self ‪set_ignoreme( true );
623  self ‪disable_pain();
624 
625  self PushPlayer( true );
626 
627  if ( isdefined( goto ) )
628  {
629  if ( IsDefined( n_radius ) )
630  {
631  Assert( ( IsFloat( n_radius ) || IsInt( n_radius ) ), "ai_shared::force_goal expects n_radius to be an int or a float." );
632  self SetGoal( goto );
633  }
634  else
635  {
636  self SetGoal( goto, true );
637  }
638  }
639 
640  self ‪util::waittill_any( "goal", "new_force_goal", str_end_on );
641 
642  if ( color_enabled )
643  {
645  }
646 
647  self PushPlayer( false ); // assume we want this off once we have reached goal
648 
649  self ClearForcedGoal();
650 
651  self.goalradius = goalradius;
652  self ‪set_ignoreall( ignoreall );
653  self ‪set_ignoreme( ignoreme );
654 
655  if ( allowpain )
656  {
657  self ‪enable_pain();
658  }
659 
660  self ‪set_behavior_attribute( "sprint", false );
661 
662  self.ignoresuppression = ignoresuppression;
663  self.grenadeawareness = grenadeawareness;
664 
665  ‪flagsys::clear( "force_goal" );
666  s_tracker notify( "done" );
667 }
668 
678 {
679  self notify("painWaitIntervalRemove");
680 }
681 
682 function private ‪_allowPainRestore()
683 {
684  self endon("death");
685  self ‪util::waittill_any("painWaitIntervalRemove","painWaitInterval");
686  self.allowPain = true;
687 }
688 
698 function ‪painWaitInterval(mSec)
699 {
700  self endon("death");
701  self notify("painWaitInterval");
702  self endon("painWaitInterval");
703  self endon("painWaitIntervalRemove");
704  self thread ‪_allowPainRestore();
705 
706  if(!isDefined(mSec) || mSec < 20 )
707  mSec = 20;
708 
709  while(isAlive(self))
710  {
711  self waittill("pain");
712  self.allowPain = false;
713  wait (mSec/1000);
714  self.allowPain = true;
715  }
716 }
717 
718 
729 function ‪patrol( start_path_node )
730 {
731  self endon( "death" );
732  self endon( "stop_patrolling" );
733 
734  assert( isDefined( start_path_node ), self.targetname + " has not been assigned a valid node or scene scriptbundle for his patrol path to start on" );
735  if ( start_path_node.type == "BAD NODE" )
736  {
737  /#
738  errorMsg = "ERROR: patrol node '" + start_path_node.targetname + "' (" + int(start_path_node.origin[0]) + "," + int(start_path_node.origin[1]) + "," + int(start_path_node.origin[2]) + ") is 'BAD NODE'";
739  IPrintLn( errorMsg );
740  LogPrint( errorMsg );
741  #/
742  return;
743  }
744  assert( start_path_node.type == "Path" || isdefined( start_path_node.scriptbundlename ), "The starting point '" + start_path_node.targetname + "' for a patrol path is not a path node or scene script bundle" );
745 
746  self notify( "go_to_spawner_target");
747  self.target = undefined;
748 
749  self.old_goal_radius = self.goalradius;
750 
751  self thread ‪end_patrol_on_enemy_targetting();
752 
753  self.currentgoal = start_path_node;
754 
755  self.patroller = true;
756 
757  While( 1 )
758  {
759 
760  if( isDefined( self.currentgoal.type) && self.currentgoal.type == "Path" )//handle case where current goal is a path node
761  {
762  if ( self ‪ai::has_behavior_attribute( "patrol" ) )
763  self ‪ai::set_behavior_attribute( "patrol", true );
764 
765  self setgoal( self.currentgoal, true );
766 
767  self waittill( "goal" );
768 
769  if( isDefined( self.currentgoal.script_notify ))
770  {
771  self notify ( self.currentgoal.script_notify );
772  level notify (self.currentgoal.script_notify );
773  }
774 
775 
776  if (isDefined( self.currentgoal.script_flag_set ))
777  {
778  flag = self.currentgoal.script_flag_set;
779 
780  if ( !isdefined( level.flag[ flag ] ) )
781  {
782  level ‪flag::init( flag );
783  }
784 
785  level ‪flag::set( flag );
786  }
787 
788 
789  if( !isDefined( self.currentgoal.script_wait_min ))
790  {
791  self.currentgoal.script_wait_min = 0;
792  }
793 
794  if( !isDefined( self.currentgoal.script_wait_max ))
795  {
796  self.currentgoal.script_wait_max = 0;
797  }
798 
799  assert( self.currentgoal.script_wait_min <= self.currentgoal.script_wait_max , "Patrol max wait is less than the min wait on " + self.currentgoal.targetname );
800 
801  if( !isdefined( self.currentgoal.scriptbundlename) )
802  {
803  wait_variability = self.currentgoal.script_wait_max - self.currentgoal.script_wait_min;
804  wait_time = self.currentgoal.script_wait_min + randomfloat( wait_variability );
805  self notify( "patrol_goal", self.currentgoal );
806  wait wait_time;
807  }
808  else
809  {
810  self ‪scene::play( self.currentgoal.scriptbundlename , self );
811  }
812  }
813  else //handle case where the current goal is a scene scriptbundle
814  {
815  self.currentgoal ‪scene::play( self );
816  }
817 
818  //once current goal handling is done, select a new goal from the targets of the current one
819  self ‪patrol_next_node();
820  }
821 }
822 
824 {
825  //get current goal targets in an array if we have a next target
826  target_nodes = [];
827  target_scenes = [];
828  if ( isdefined( self.currentgoal.target ) )
829  {
830  target_nodes = getnodearray( self.currentgoal.target, "targetname" );
831  target_scenes = ‪struct::get_array( self.currentgoal.target , "targetname" );
832  }
833 
834  if( target_nodes.size == 0 && target_scenes.size == 0 )
835  {
837  }
838  else
839  {
840  if( target_nodes.size != 0)
841  {
842  self.currentgoal = array::random( target_nodes );
843  }
844  else
845  {
846  self.currentgoal = array::random( target_scenes );
847  }
848  }
849 }
850 
852 {
853 
854  self endon( "death" );
855  self endon( "stop_patrolling" );
856 
857  While(1)
858  {
859  if( isdefined( self.enemy) || self.should_stop_patrolling === true )
860  {
862  }
863 
864  wait 0.1;
865  }
866 }
867 
869 {
870  if ( isdefined( self.currentgoal ) && isdefined( self.currentgoal.scriptbundlename ) && isDefined( self._o_scene ) )
871  self._o_scene ‪cscene::stop();
872 
873  if ( self ‪ai::has_behavior_attribute( "patrol" ) )
874  self ‪ai::set_behavior_attribute( "patrol", false );
875  if ( isDefined( self.old_goal_radius ) )
876  self.goalradius = self.old_goal_radius;
877  self ClearForcedGoal();
878  self notify( "stop_patrolling" );
879  self.patroller = undefined;
880 }
881 
882 
893 function ‪bloody_death( n_delay, hit_loc )
894 {
895  self endon( "death" );
896 
897  if( !IsDefined( self ) )
898  {
899  return;
900  }
901 
902  assert( IsActor( self ) );
903  assert( IsAlive( self ) );
904 
905  if( ‪IS_TRUE( self.__bloody_death ) )
906  return;
907 
908  self.__bloody_death = true;
909 
910  if( IsDefined( n_delay ) )
911  {
912  wait n_delay;
913  }
914 
915  if( !IsDefined( self ) || !IsAlive( self ) )
916  {
917  return;
918  }
919 
920  if( IsDefined( hit_loc ) )
921  {
922  assert( IsInArray( HITLOC_ALL, hit_loc ), "bloody_death() : Invalid hit location. Check the list of allowed hit location in blackboard.gsh, HITLOC_ALL." );
923  }
924  else
925  {
926  hit_loc = array::random( HITLOC_ALL );
927  }
928 
929  self DoDamage( self.health + 100, self.origin, undefined, undefined, hit_loc );
930 }
931 
942 {
943  if( ‪IS_TRUE( level.clientFieldAICheck ) && !IsArchetypeLoaded( archetype ) )
944  return false;
945 
946  return true;
947 }
‪enable
‪function enable(handler)
Definition: _perplayer.gsc:54
‪painWaitInterval
‪function painWaitInterval(mSec)
Definition: ai_shared.gsc:698
‪waittill_dead_or_dying_thread
‪function waittill_dead_or_dying_thread(ent)
Definition: ai_shared.gsc:335
‪force_goal
‪function force_goal(goto, n_radius, b_shoot=true, str_end_on, b_keep_colors=false, b_should_sprint=false)
Definition: ai_shared.gsc:570
‪wait_for_shoot
‪function private wait_for_shoot()
Definition: ai_shared.gsc:349
‪_force_goal
‪function _force_goal(s_tracker, goto, n_radius, b_shoot=true, str_end_on, b_keep_colors=false, b_should_sprint=false)
Definition: ai_shared.gsc:578
‪gun_recall
‪function gun_recall()
Definition: ai_shared.gsc:141
‪disable_pain
‪function disable_pain()
Definition: ai_shared.gsc:80
‪clear
‪function clear(str_flag)
Definition: flag_shared.csc:130
‪waittill_dead_thread
‪function private waittill_dead_thread(ent)
Definition: ai_shared.gsc:328
‪stop_shoot_at_target
‪function stop_shoot_at_target()
Definition: ai_shared.gsc:491
‪SetAiAttribute
‪function SetAiAttribute(entity, attribute, value)
Definition: ai_interface.gsc:228
‪play
‪function play(animation, v_origin_or_ent, v_angles_or_tag, n_rate=1, n_blend_in=.2, n_blend_out=.2, n_lerp, b_link=false)
Definition: animation_shared.csc:44
‪shouldRegisterClientFieldForArchetype
‪function shouldRegisterClientFieldForArchetype(archetype)
Definition: ai_shared.gsc:941
‪waittill_either
‪function waittill_either(msg1, msg2)
Definition: util_shared.gsc:303
‪end_patrol_on_enemy_targetting
‪function end_patrol_on_enemy_targetting()
Definition: ai_shared.gsc:851
‪get_array
‪function get_array(kvp_value, kvp_key="targetname")
Definition: struct.csc:34
‪waittill_dead_or_dying
‪function waittill_dead_or_dying(guys, num, timeoutLength)
Definition: ai_shared.gsc:292
‪HasAiAttribute
‪function HasAiAttribute(entity, attribute)
Definition: ai_interface.gsc:132
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪disable
‪function disable(handler)
Definition: _perplayer.gsc:79
‪waittill_dead
‪function waittill_dead(guys, num, timeoutLength)
Definition: ai_shared.gsc:233
‪set_goal
‪function set_goal(value, key="targetname", b_force=false)
Definition: ai_shared.gsc:527
‪end_and_clean_patrol_behaviors
‪function end_and_clean_patrol_behaviors()
Definition: ai_shared.gsc:868
‪bloody_death
‪function bloody_death(n_delay, hit_loc)
Definition: ai_shared.gsc:893
‪has_behavior_attribute
‪function has_behavior_attribute(attribute)
Definition: ai_shared.gsc:198
‪ClearAllCooldowns
‪function ClearAllCooldowns()
Definition: vehicle_ai_shared.gsc:1995
‪set_ignoreall
‪function set_ignoreall(val)
Definition: ai_shared.gsc:49
‪waittill_any
‪function waittill_any(str_notify1, str_notify2, str_notify3, str_notify4, str_notify5)
Definition: util_shared.csc:375
‪is_dead_sentient
‪function is_dead_sentient()
Definition: ai_shared.gsc:210
‪enable_pain
‪function enable_pain()
Definition: ai_shared.gsc:95
‪_allowPainRestore
‪function private _allowPainRestore()
Definition: ai_shared.gsc:682
‪gun_switchto
‪function gun_switchto(weapon, whichHand)
Definition: ai_shared.gsc:127
‪GetAiAttribute
‪function GetAiAttribute(entity, attribute)
Definition: ai_interface.gsc:118
‪stopPainWaitInterval
‪function stopPainWaitInterval()
Definition: ai_shared.gsc:677
‪stop
‪function stop(n_blend=0.2)
Definition: animation_shared.gsc:97
‪init
‪function init()
Definition: struct.csc:1
‪wait_until_done_speaking
‪function wait_until_done_speaking()
Definition: ai_shared.gsc:506
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪IS_EQUAL
‪#define IS_EQUAL(__a, __b)
Definition: shared.gsh:250
‪set_behavior_attribute
‪function set_behavior_attribute(attribute, value)
Definition: ai_shared.gsc:159
‪set_pacifist
‪function set_pacifist(val)
Definition: ai_shared.gsc:65
‪patrol_next_node
‪function patrol_next_node()
Definition: ai_shared.gsc:823
‪set_ignoreme
‪function set_ignoreme(val)
Definition: ai_shared.gsc:33
‪wait_till_clear
‪function wait_till_clear(str_flag)
Definition: flag_shared.csc:248
‪IS_BONUSZM
‪#define IS_BONUSZM
Definition: shared.gsh:532
‪waittill_dead_timeout
‪function waittill_dead_timeout(timeoutLength)
Definition: ai_shared.gsc:342
‪get_behavior_attribute
‪function get_behavior_attribute(attribute)
Definition: ai_shared.gsc:184
‪patrol
‪function patrol(start_path_node)
Definition: ai_shared.gsc:729
‪shoot_at_target
‪function shoot_at_target(mode, target, tag, duration, setHealth, ignoreFirstShotWait)
Definition: ai_shared.gsc:380
‪gun_remove
‪function gun_remove()
Definition: ai_shared.gsc:110
‪placeWeaponOn
‪function placeWeaponOn(weapon, position)
Definition: shared.gsc:58
‪get_force_color
‪function get_force_color()
Definition: colors_shared.gsc:1932
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265