‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
zm_giant.csc
Go to the documentation of this file.
1 
2 #using scripts\codescripts\struct;
3 #using scripts\shared\audio_shared;
4 #using scripts\shared\callbacks_shared;
5 #using scripts\shared\clientfield_shared;
6 #using scripts\shared\exploder_shared;
7 #using scripts\shared\scene_shared;
8 #using scripts\shared\util_shared;
9 
10 #insert scripts\shared\shared.gsh;
11 #insert scripts\shared\version.gsh;
12 
13 #using scripts\zm\zm_giant_amb;
14 #using scripts\zm\zm_giant_fx;
15 #using scripts\zm\zm_giant_teleporter;
16 
17 #using scripts\zm\_load;
18 #using scripts\zm\_zm_weapons;
19 
20 //Perks
21 #using scripts\zm\_zm_pack_a_punch;
22 #using scripts\zm\_zm_perk_additionalprimaryweapon;
23 #using scripts\zm\_zm_perk_doubletap2;
24 #using scripts\zm\_zm_perk_deadshot;
25 #using scripts\zm\_zm_perk_juggernaut;
26 #using scripts\zm\_zm_perk_quick_revive;
27 #using scripts\zm\_zm_perk_sleight_of_hand;
28 #using scripts\zm\_zm_perk_staminup;
29 
30 //Powerups
31 #using scripts\zm\_zm_powerup_double_points;
32 #using scripts\zm\_zm_powerup_carpenter;
33 #using scripts\zm\_zm_powerup_fire_sale;
34 #using scripts\zm\_zm_powerup_free_perk;
35 #using scripts\zm\_zm_powerup_full_ammo;
36 #using scripts\zm\_zm_powerup_insta_kill;
37 #using scripts\zm\_zm_powerup_nuke;
38 #using scripts\zm\_zm_powerup_weapon_minigun;
39 
40 //Traps
41 #using scripts\zm\_zm_trap_electric;
42 
43 #using scripts\zm\zm_usermap;
44 
45 
46 #precache( "client_fx", "zombie/fx_glow_eye_orange" );
47 #precache( "client_fx", "zombie/fx_bul_flesh_head_fatal_zmb" );
48 #precache( "client_fx", "zombie/fx_bul_flesh_head_nochunks_zmb" );
49 #precache( "client_fx", "zombie/fx_bul_flesh_neck_spurt_zmb" );
50 #precache( "client_fx", "zombie/fx_blood_torso_explo_zmb" );
51 #precache( "client_fx", "trail/fx_trail_blood_streak" );
52 #precache( "client_fx", "dlc0/factory/fx_snow_player_os_factory" );
53 
54 function autoexec ‪opt_in()
55 {
61 }
62 
63 function ‪main()
64 {
66 
68 
69  level._effect["animscript_gib_fx"] = "zombie/fx_blood_torso_explo_zmb";
70  level._effect["animscript_gibtrail_fx"] = "trail/fx_trail_blood_streak";
71 
72  level._effect[ "player_snow" ] = "dlc0/factory/fx_snow_player_os_factory";
73 
74  //If enabled then the zombies will get a keyline round them so we can see them through walls
75  level.debug_keyline_zombies = false;
76 
77  level thread ‪zm_giant_amb::main();
78  level thread ‪power_on_fxanims();
79 
81 }
82 
84 {
85  level waittill( "power_on" );
86 
87  //level thread scene::play( "p7_fxanim_gp_wire_sparking_ground_01_bundle" );
88 }
89 
90 
91 function ‪console_blue( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
92 {
93  s_scene = ‪struct::get( "top_dial" );
94  if( newVal )
95  {
96  ‪exploder::kill_exploder( "teleporter_controller_red_light_1" );
97  ‪exploder::exploder( "teleporter_controller_light_1" );
98  s_scene thread ‪scene::play();
99  }
100  else
101  {
102  ‪exploder::kill_exploder( "teleporter_controller_light_1" );
103  s_scene ‪scene::stop( true );
104  s_scene ‪scene::init();
105  }
106 }
107 
108 function ‪console_green( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
109 {
110  s_scene = ‪struct::get( "middle_dial" );
111  if( newVal )
112  {
113  ‪exploder::kill_exploder( "teleporter_controller_red_light_2" );
114  ‪exploder::exploder( "teleporter_controller_light_2" );
115  s_scene thread ‪scene::play();
116  }
117  else
118  {
119  ‪exploder::kill_exploder( "teleporter_controller_light_2" );
120  s_scene ‪scene::stop( true );
121  s_scene ‪scene::init();
122  }
123 }
124 
125 function ‪console_red( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
126 {
127  s_scene = ‪struct::get( "bottom_dial" );
128  if( newVal )
129  {
130  ‪exploder::kill_exploder( "teleporter_controller_red_light_3" );
131  ‪exploder::exploder( "teleporter_controller_light_3" );
132  s_scene thread ‪scene::play();
133  }
134  else
135  {
136  ‪exploder::kill_exploder( "teleporter_controller_light_3" );
137  s_scene ‪scene::stop( true );
138  s_scene ‪scene::init();
139  }
140 }
141 
142 function ‪console_start( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
143 {
144  if( newVal )
145  {
146  ‪exploder::exploder( "teleporter_controller_red_light_1" );
147  ‪exploder::exploder( "teleporter_controller_red_light_2" );
148  ‪exploder::exploder( "teleporter_controller_red_light_3" );
149  }
150 }
151 
152 function ‪lightning_strike( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
153 {
154  SetUkkoScriptIndex( localClientNum, 1, 1 ); //index 3 and 4
155 
156  playsound (0, "amb_lightning_dist_low", (0,0,0));
157 
158  wait 0.02; // off, start after sound
159  SetUkkoScriptIndex( localClientNum, 3, 1 );
160  wait 0.15; //on
161  SetUkkoScriptIndex( localClientNum, 1, 1 );
162  wait 0.1; //off
163  SetUkkoScriptIndex( localClientNum, 4, 1 );
164  wait 0.1; //on
165  SetUkkoScriptIndex( localClientNum, 3, 1 );
166  wait 0.25; //on
167  SetUkkoScriptIndex( localClientNum, 1, 1 );
168  wait 0.15; //off
169  SetUkkoScriptIndex( localClientNum, 3, 1 );
170  wait 0.15; //on
171  SetUkkoScriptIndex( localClientNum, 1, 1 ); // off
172 }
‪waitforclient
‪function waitforclient(client)
Definition: util_shared.csc:60
‪exploder
‪function exploder(exploder_id, n_localclientnumber)
Definition: exploder_shared.csc:297
‪main
‪function main()
Definition: zm_giant.csc:63
‪opt_in
‪function autoexec opt_in()
Definition: zm_giant.csc:54
‪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
‪CF_CALLBACK_ZERO_ON_NEW_ENT
‪#define CF_CALLBACK_ZERO_ON_NEW_ENT
Definition: version.gsh:103
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪lightning_strike
‪function lightning_strike(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: zm_giant.csc:152
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪stop
‪function stop(n_blend=0.2)
Definition: animation_shared.gsc:97
‪init
‪function init()
Definition: struct.csc:1
‪power_on_fxanims
‪function power_on_fxanims()
Definition: zm_giant.csc:83
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪kill_exploder
‪function kill_exploder(exploder_id)
Definition: exploder_shared.csc:412
‪console_green
‪function console_green(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: zm_giant.csc:108
‪console_red
‪function console_red(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: zm_giant.csc:125
‪console_blue
‪function console_blue(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: zm_giant.csc:91
‪console_start
‪function console_start(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: zm_giant.csc:142