Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function spawn_brutuses()
- {
- model_l = util::spawn_model("tag_origin", self.origin);
- self LinkTo(model_l);
- self ASMRequestSubstate( "death@tigershark" );
- self vehicle_ai::waittill_asm_complete( "death@tigershark", 3 );
- self Unlink();
- Earthquake(1,2,self.origin,5000);
- foreach(struct in struct::get("thrasher_spawn"))
- {
- thread spawn_thrasher(struct);
- }
- }
- function spawn_thrasher(struct)
- {
- stalker = GetEnt("stalker_spawner", "script_noteworthy");
- ai = zombie_utility::spawn_zombie( stalker , "stalker" , struct);
- ai SetInvisibleToAll();
- while(ai.origin != struct.origin)
- wait 0.05;
- ai SetVisibleToAll();
- ai thread symbos_anim_scripted( "ai_zm_dlc2_thrasher_teleport_out", undefined, undefined, undefined, .5, 0.5);
- }
- function quadrotor_crash_movement( attacker, hitdir )
- {
- self endon( "crash_done" );
- self endon( "death" );
- self CancelAIMove();
- self ClearVehGoalPos();
- self ClearLookAtEnt();
- self SetPhysAcceleration( ( 0, 0, -800 ) );
- self.vehcheckforpredictedcrash = true; // code field to get veh_predictedcollision notify
- if( !isdefined( hitdir ) )
- {
- hitdir = (1,0,0);
- }
- side_dir = VectorCross( hitdir, (0,0,1) );
- side_dir_mag = RandomFloatRange( -100, 100 );
- side_dir_mag += math::sign( side_dir_mag ) * 80;
- side_dir *= side_dir_mag;
- self SetVehVelocity( self.velocity + (0,0,100) + VectorNormalize( side_dir ) );
- ang_vel = self GetAngularVelocity();
- ang_vel = ( ang_vel[0] * 0.3, ang_vel[1], ang_vel[2] * 0.3 );
- yaw_vel = RandomFloatRange( 0, 210 ) * math::sign( ang_vel[1] );
- yaw_vel += math::sign( yaw_vel ) * 180;
- ang_vel += ( RandomFloatRange( -1, 1 ), yaw_vel, RandomFloatRange( -1, 1 ) );
- self SetAngularVelocity( ang_vel );
- self.crash_accel = RandomFloatRange( 75, 110 );
- self thread quadrotor_collision();
- //drone death sounds JM - play 1 shot hit, turn off main loop, thread dmg loop
- self playsound("veh_qrdrone_dmg_hit");
- self vehicle::toggle_sounds( 0 );
- if( !isdefined( self.off ) )
- {
- self thread qrotor_dmg_snd();
- }
- wait 0.1;
- if( RandomInt( 100 ) < 40 && !isdefined( self.off ) )
- {
- self thread quadrotor_fire_for_time( RandomFloatRange( 0.7, 2.0 ) );
- }
- wait 15;
- // failsafe notify
- self notify( "crash_done" );
- }
- function quadrotor_predicted_collision()
- {
- self endon( "crash_done" );
- self endon( "death" );
- while( 1 )
- {
- self waittill( "veh_predictedcollision", velocity, normal );
- if( normal[2] >= 0.6 )
- {
- self notify( "veh_collision", velocity, normal );
- }
- }
- }
- function ending()
- {
- level notify("bossfight_over");
- enemy = getAITeamArray("axis");
- array::run_all( zombies, &Kill );
- IPrintLnBold("what is left to script");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement