UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Adding delay to scavenger script

broken avatar :(
Created 9 years ago
by vinnyz500
0 Members and 1 Guest are viewing this topic.
3,188 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 3 years ago
Posts
397
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
vinnyz500's Groups
vinnyz500's Contact & Social Linkspsn_hackedlobbies4uXxMrPotatoxXvinnyz500
Hey UGX, i got a script from rorkes weapon pack with the scavenger script in it and the FX plays immediatly rather than waiting 2.5s. How would i fix this? i see a code for it to wait but it doesnt seem to want to... Here is the code (i know its sloppy thats how it came  :(
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#using_animtree( "generic_human" );
init()
{
precacheModel("bo1_scavenger_non_upgraded_projectile");
precacheModel("tag_origin");
level thread sniper_explosive_on_player_connect();
level._effect["zombie_obliterate"] = loadfx( "scvgr/none" );
level._effect["scvgr_explode"] = loadfx( "scvgr/fx_scavenger_explode" );
level._effect["scvgr_explode_upgraded"] = loadfx( "scvgr/fx_scavenger_up_explode" );
}

sniper_explosive_on_player_connect()
{
for( ;; )
{
level waittill( "connecting", player );
player thread watch_for_sniper_bolt();
}
}

creath_hud_elems()
{
self endon( "death" );
self endon( "disconnect" );
player = self;
for (;;)
{
wait(1);
zombies = getaiarray("axis");
for(i = 0; i < zombies.size; i++)
zombies[i] thread create_zombie_hud_elems(player);
}
}

create_zombie_hud_elems(player)
{
if(player.scoped_in == true)
{
iconOrg = self.origin;icon = NewClientHudElem(player);
icon.x = iconOrg[0];
icon.y = iconOrg[1];
icon.z = iconOrg[2] + 54;
icon.alpha = 1;
icon.archived = true;
icon setShader("zombie_kill", 120, 120);
wait 1;icon destroy();
}
}

watch_for_sniper_bolt()
{
self endon( "death" );
self endon( "disconnect" );
for (;;)
{
point = undefined;
self waittill("projectile_impact", weapon, point);
if(isdefined(point))if(weapon == "scavenger")
{
self thread scvgr_explode(point);
}
if(weapon == "scavenger_upgraded")
{
self thread scvgr_explode_upgraded(point);
}
}
}

scvgr_explode(point)
{
target = undefined;
ai = getaiarray("axis");
target = get_closest_living(point, ai, 400 );
angles = self getplayerangles();
dist = distance2d(target.origin, point);
grenade = spawn("script_origin", point);
model = spawn("script_model", grenade.origin);
model.angles = angles;
model setmodel("bo1_scavenger_non_upgraded_projectile");
soundemitter = spawn("script_model", grenade.origin);
soundemitter setmodel("tag_origin");
soundemitter thread scvgr_fired_sound(grenade);
if(dist < 30)
{
grenade linkto(target, "J_MainRoot");
model linkto(target, "J_MainRoot");
}
wait 2.5;
playfx( level._effect["scvgr_explode"], grenade.origin );
model delete();
excluders = undefined;
zombies = undefined;
ai = getaiarray("axis");
zombies = get_array_of_closest( grenade.origin, ai, excluders, 666, 400 );
self thread damage_self(grenade, 60);
player = self;
for(i = 0; i < zombies.size; i++)
{
zombies[i] thread kill_or_damage(grenade, player);
}
wait 3;
grenade delete();
}

scvgr_explode_upgraded(point)
{
target = undefined;
ai = getaiarray("axis");
target = get_closest_living(point, ai, 800 );
angles = self getplayerangles();
dist = distance2d(target.origin, point);
grenade = spawn("script_origin", point);
model = spawn("script_model", grenade.origin);
model.angles = angles;
model setmodel("bo1_scavenger_non_upgraded_projectile");
soundemitter = spawn("script_model", grenade.origin);
soundemitter setmodel("tag_origin");
soundemitter thread scvgr_fired_sound_upgraded(grenade);
if(dist < 30)
{
grenade linkto(target, "J_MainRoot");
model linkto(target, "J_MainRoot");
}
wait 3.5;
playfx( level._effect["scvgr_explode_upgraded"], grenade.origin );
model delete();
excluders = undefined;
zombies = undefined;
ai = getaiarray("axis");
zombies = get_array_of_closest( grenade.origin, ai, excluders, 666, 800 );
self thread damage_self(grenade, 120);
player = self;
for(i = 0; i < zombies.size; i++)
{
zombies[i] thread kill_or_damage_upgraded(grenade, player);
}
wait 3;
grenade delete();
}

scvgr_fired_sound(grenade)
{
self playsound("scavenger_build_up");
self linkto(grenade);
wait 2.5;
self unlink();
self playsound("scavenger_explode");
wait 0.1;
self delete();
}

scvgr_fired_sound_upgraded(grenade)
{
self playsound("scavenger_build_up");
self linkto(grenade);
wait 3.5;self unlink();
self playsound("scavenger_explode");
}

kill_or_damage(grenade, player)
{
if(self.health < 10000)
{
playfxontag(level._effect["zombie_obliterate"],self,"tag_origin");
player maps\_zombiemode_score::add_to_player_score(50);
}
player maps\_zombiemode_score::add_to_player_score(10);
self dodamage(10000, grenade.origin);
}

kill_or_damage_upgraded(grenade, player)
{
if(self.health < 20000 && self.brutus == false)
{
playfxontag(level._effect["zombie_obliterate"],self,"tag_origin");
player maps\_zombiemode_score::add_to_player_score(50);
}
player maps\_zombiemode_score::add_to_player_score(10);
self dodamage(20000, grenade.origin);
}

damage_self(grenade, damage)
{
dist = distance(grenade.origin, self.origin);
if(dist < 400)
{
RadiusDamage(self.origin, 50, damage, damage);
}
}
but it doesnt work...

EDIT: shit so sorry i put in wrong section, if you could move it to scripting i would appreciate it :)
Last Edit: March 29, 2015, 01:00:40 am by Harry Bo21
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
moved and fixed your code box

From what i see, theres no reason it shouldnt wait. Should be working fine
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
FX is played through weapon file. Remove it from there and then add FX in mod.csv
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 3 years ago
Posts
397
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
vinnyz500's Groups
vinnyz500's Contact & Social Linkspsn_hackedlobbies4uXxMrPotatoxXvinnyz500
FX is played through weapon file. Remove it from there and then add FX in mod.csv
I tried that, it still played the FX upon impact. I mean, it doesnt look all that bad, the FX plays and as it is closing out it kills them.

Last Edit: March 29, 2015, 03:24:17 am by vinnyz500
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
what he meant was to remove the fx from the weaponfile and then in watch for sniper bolt function add the desired wait like "3 secs" then check in the "scvgr_explode(point)" function the line where fx is played and add that fx to your mod.csv.

ps.nevermind i was lazy to read the code, it seems to be fine so just do the weaponfile thing and ignore my post :P
Last Edit: March 29, 2015, 07:18:34 am by jjbradman
broken avatar :(
×
broken avatar :(
Remington R5
Location: gbBarnsley
Date Registered: 18 January 2015
Last active: 3 years ago
Posts
742
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
paypal.me/RT275
Signature
paypal.me/RT275
×
Rorke's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Rorke's Contact & Social Linkshickle.meddowsandrewshaworiginal_rorkewormnation
what exactly are you having issues with? if its the fx being played at wrong time then smasher said he tried to fix it but he cdnt see anything wrong so it went un-fixed as for the weapon file well do what you want........
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I tried that, it still played the FX upon impact. I mean, it doesnt look all that bad, the FX plays and as it is closing out it kills them.

(Image removed from quote.)

Untick ProjImpactExplode, then remove scavenger_explode sound. You sure FX is like this in mod.csv: fx,scvgr/fx_scavenger_explode
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 3 years ago
Posts
397
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
vinnyz500's Groups
vinnyz500's Contact & Social Linkspsn_hackedlobbies4uXxMrPotatoxXvinnyz500
Untick ProjImpactExplode, then remove scavenger_explode sound. You sure FX is like this in mod.csv: fx,scvgr/fx_scavenger_explode
if I un tick that the weapon does no damage
Last Edit: March 30, 2015, 02:28:53 am by vinnyz500
broken avatar :(
×
broken avatar :(
Remington R5
Location: gbBarnsley
Date Registered: 18 January 2015
Last active: 3 years ago
Posts
742
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
paypal.me/RT275
×
Rorke's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Rorke's Contact & Social Linkshickle.meddowsandrewshaworiginal_rorkewormnation
have you tried changeing the time till the prj explodes?
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
if I un tick that the weapon does no damage

Wait, checking mine

Oh yeah, keep it ticked. But remove the FX stuff in weapon file
Last Edit: March 31, 2015, 01:36:42 pm by HitmanVere
Marked as best answer by vinnyz500 9 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 3 years ago
Posts
397
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
vinnyz500's Groups
vinnyz500's Contact & Social Linkspsn_hackedlobbies4uXxMrPotatoxXvinnyz500
To simplify it, just remove the sound and FX called in the projectile section and call it in your mod. Works perfect for me. Thanks HitmanVere
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 9 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
To simplify it, just remove the sound and FX called in the projectile section and call it in your mod. Works perfect for me. Thanks HitmanVere

Which is what I said and you didnt mark my answer? :P

 
Loading ...