Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. function spawn_brutuses()
  2. {
  3. model_l = util::spawn_model("tag_origin", self.origin);
  4. self LinkTo(model_l);
  5. self ASMRequestSubstate( "death@tigershark" );
  6. self vehicle_ai::waittill_asm_complete( "death@tigershark", 3 );
  7. self Unlink();
  8.  
  9. Earthquake(1,2,self.origin,5000);
  10.  
  11. foreach(struct in struct::get("thrasher_spawn"))
  12. {
  13. thread spawn_thrasher(struct);
  14. }
  15.  
  16.  
  17. }
  18.  
  19. function spawn_thrasher(struct)
  20. {
  21. stalker = GetEnt("stalker_spawner", "script_noteworthy");
  22. ai = zombie_utility::spawn_zombie( stalker , "stalker" , struct);
  23. ai SetInvisibleToAll();
  24. while(ai.origin != struct.origin)
  25. wait 0.05;
  26.  
  27. ai SetVisibleToAll();
  28. ai thread symbos_anim_scripted( "ai_zm_dlc2_thrasher_teleport_out", undefined, undefined, undefined, .5, 0.5);
  29.  
  30. }
  31.  
  32.  
  33.  
  34. function quadrotor_crash_movement( attacker, hitdir )
  35. {
  36. self endon( "crash_done" );
  37. self endon( "death" );
  38.  
  39. self CancelAIMove();
  40. self ClearVehGoalPos();
  41. self ClearLookAtEnt();
  42.  
  43. self SetPhysAcceleration( ( 0, 0, -800 ) );
  44. self.vehcheckforpredictedcrash = true; // code field to get veh_predictedcollision notify
  45.  
  46. if( !isdefined( hitdir ) )
  47. {
  48. hitdir = (1,0,0);
  49. }
  50.  
  51. side_dir = VectorCross( hitdir, (0,0,1) );
  52. side_dir_mag = RandomFloatRange( -100, 100 );
  53. side_dir_mag += math::sign( side_dir_mag ) * 80;
  54. side_dir *= side_dir_mag;
  55.  
  56. self SetVehVelocity( self.velocity + (0,0,100) + VectorNormalize( side_dir ) );
  57.  
  58. ang_vel = self GetAngularVelocity();
  59. ang_vel = ( ang_vel[0] * 0.3, ang_vel[1], ang_vel[2] * 0.3 );
  60.  
  61. yaw_vel = RandomFloatRange( 0, 210 ) * math::sign( ang_vel[1] );
  62. yaw_vel += math::sign( yaw_vel ) * 180;
  63.  
  64. ang_vel += ( RandomFloatRange( -1, 1 ), yaw_vel, RandomFloatRange( -1, 1 ) );
  65.  
  66. self SetAngularVelocity( ang_vel );
  67.  
  68. self.crash_accel = RandomFloatRange( 75, 110 );
  69.  
  70.  
  71. self thread quadrotor_collision();
  72.  
  73. //drone death sounds JM - play 1 shot hit, turn off main loop, thread dmg loop
  74. self playsound("veh_qrdrone_dmg_hit");
  75. self vehicle::toggle_sounds( 0 );
  76.  
  77. if( !isdefined( self.off ) )
  78. {
  79. self thread qrotor_dmg_snd();
  80. }
  81.  
  82. wait 0.1;
  83.  
  84. if( RandomInt( 100 ) < 40 && !isdefined( self.off ) )
  85. {
  86. self thread quadrotor_fire_for_time( RandomFloatRange( 0.7, 2.0 ) );
  87. }
  88.  
  89. wait 15;
  90.  
  91. // failsafe notify
  92. self notify( "crash_done" );
  93. }
  94.  
  95. function quadrotor_predicted_collision()
  96. {
  97. self endon( "crash_done" );
  98. self endon( "death" );
  99.  
  100. while( 1 )
  101. {
  102. self waittill( "veh_predictedcollision", velocity, normal );
  103. if( normal[2] >= 0.6 )
  104. {
  105. self notify( "veh_collision", velocity, normal );
  106. }
  107. }
  108. }
  109.  
  110. function ending()
  111. {
  112. level notify("bossfight_over");
  113. enemy = getAITeamArray("axis");
  114. array::run_all( zombies, &Kill );
  115.  
  116.  
  117. IPrintLnBold("what is left to script");
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement