mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 15:17:57 -05:00
Titus-6: add projectile sound and fx
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
main()
|
||||
{
|
||||
replaceFunc(clientscripts\mp\zombies\_zm::init_wallbuy_fx, scripts\zm\replaced\_zm::init_wallbuy_fx);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm::entityspawned, scripts\zm\replaced\_zm::entityspawned);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm_audio::sndmeleeswipe, scripts\zm\replaced\_zm_audio::sndmeleeswipe);
|
||||
replaceFunc(clientscripts\mp\zombies\_zm_weapons::init, scripts\zm\replaced\_zm_weapons::init);
|
||||
|
||||
|
33
scripts/zm/reimagined/_explosive_dart.csc
Normal file
33
scripts/zm/reimagined/_explosive_dart.csc
Normal file
@ -0,0 +1,33 @@
|
||||
main()
|
||||
{
|
||||
level._effect["dart_light"] = loadfx("weapon/titus/fx_titus_bolt_blink_os");
|
||||
}
|
||||
|
||||
spawned(localclientnum)
|
||||
{
|
||||
player = getlocalplayer(localclientnum);
|
||||
enemy = 0;
|
||||
self.fxtagname = "tag_origin";
|
||||
|
||||
if (self.team != player.team)
|
||||
enemy = 1;
|
||||
|
||||
self thread loop_local_sound(localclientnum, "wpn_titus_alert", 0.3, level._effect["dart_light"]);
|
||||
}
|
||||
|
||||
loop_local_sound(localclientnum, alias, interval, fx)
|
||||
{
|
||||
self endon("entityshutdown");
|
||||
|
||||
while (true)
|
||||
{
|
||||
self playsound(localclientnum, alias);
|
||||
n_id = playfxontag(localclientnum, fx, self, self.fxtagname);
|
||||
wait(interval);
|
||||
stopfx(localclientnum, n_id);
|
||||
interval /= 1.2;
|
||||
|
||||
if (interval < 0.1)
|
||||
interval = 0.1;
|
||||
}
|
||||
}
|
7
scripts/zm/reimagined/_explosive_dart.gsc
Normal file
7
scripts/zm/reimagined/_explosive_dart.gsc
Normal file
@ -0,0 +1,7 @@
|
||||
#include maps\_utility;
|
||||
#include common_scripts\utility;
|
||||
|
||||
init()
|
||||
{
|
||||
loadfx("weapon/titus/fx_titus_bolt_blink_os");
|
||||
}
|
@ -43,4 +43,30 @@ init_wallbuy_fx()
|
||||
|
||||
if (isdefined(level.buildable_wallbuy_weapons))
|
||||
level._effect["dynamic_wallbuy_fx"] = loadfx("maps/zombie/fx_zmb_wall_buy_question");
|
||||
}
|
||||
|
||||
entityspawned(localclientnum)
|
||||
{
|
||||
if (!isdefined(self.type))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.type == "player")
|
||||
self thread playerspawned(localclientnum);
|
||||
|
||||
if (self.type == "missile")
|
||||
{
|
||||
switch (self.weapon)
|
||||
{
|
||||
case "sticky_grenade_zm":
|
||||
self thread clientscripts\mp\_sticky_grenade::spawned(localclientnum);
|
||||
break;
|
||||
|
||||
case "titus6_explosive_dart_zm":
|
||||
case "titus6_explosive_dart_upgraded_zm":
|
||||
self thread scripts\zm\reimagined\_explosive_dart::spawned(localclientnum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -4,4 +4,6 @@
|
||||
main()
|
||||
{
|
||||
replaceFunc(clientscripts\mp\zm_nuked::main, scripts\zm\replaced\zm_nuked::main);
|
||||
|
||||
scripts\zm\reimagined\_explosive_dart::main();
|
||||
}
|
@ -11,6 +11,8 @@ main()
|
||||
replaceFunc(maps\mp\zm_nuked_standard::main, scripts\zm\replaced\zm_nuked_standard::main);
|
||||
replaceFunc(maps\mp\zm_nuked_perks::init_nuked_perks, scripts\zm\replaced\zm_nuked_perks::init_nuked_perks);
|
||||
replaceFunc(maps\mp\zm_nuked_perks::perks_from_the_sky, scripts\zm\replaced\zm_nuked_perks::perks_from_the_sky);
|
||||
|
||||
scripts\zm\reimagined\_explosive_dart::init();
|
||||
}
|
||||
|
||||
init()
|
||||
|
Reference in New Issue
Block a user