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

Black Ops perks interfering with my soul chest :(

broken avatar :(
Created 11 years ago
by AlecKeaneDUB
0 Members and 1 Guest are viewing this topic.
3,123 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
I used bluntstuffy's soul chest script in my map and i had it working perfectly until I added in Bam's black ops perks. The perks work just fine, but my soul chest doesn't. Here's the soul chest script I am using: (keep in mind that blunt modified this script for me slightly by taking out the models, and I changed the soul_chest_reward myself)
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_anim;

PreCache_soul_chest()
{
    level._effect["blst_chest_soul"] = loadfx("blst_custom/blst_fx_chest_soul");
}

main()
{
reward_trigger = getentarray( "soul_chest_reward" , "targetname" );
for(i=0;i<reward_trigger.size;i++)
{
reward_trigger[i] disable_trigger();
}


  soul_chest_area = getentarray( "soul_chest_area" , "targetname") ;
for(i=0;i<soul_chest_area.size;i++)
{
soul_chest_area[i] thread spawn_initial_model();
}

level.chest_amount = soul_chest_area.size;
level.chest_active = true;
level.chest_completed = 0;
level.chest_counting = 0;
}
 
spawn_initial_model()
{
self.death_count = 0;
}




chest_anims()
{
/////////////////////////////////////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE /////////////////////////////////////////////////////////////////////////////
players = getplayers();
if(players.size > 1)
{
chest_1_kills = 100;
}
else
{
chest_1_kills = 10;
}
chest_2_kills = 25;
chest_3_kills = 45;
chest_4_kills = 65;
chest_5_kills = 90;
chest_6_kills = 140;
/////////////////////////////////////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE /////////////////////////////////////////////////////////////////////////////

chest_clip = getentarray( "soul_chest_clip" , "targetname" );
self.max_count = undefined;

if( level.chest_completed == 0 )
{
if( level.chest_counting == 1   )
{
self.max_count = chest_1_kills;
}

else if( level.chest_counting == 2 )
{
self.max_count = chest_2_kills;
}

else if( level.chest_counting == 3 )
{
self.max_count = chest_3_kills;
}

else if( level.chest_counting == 4 )
{
self.max_count = chest_4_kills;
}

else if( level.chest_counting == 5 )
{
self.max_count = chest_5_kills;
}

else if( level.chest_counting == 6 )
{
self.max_count = chest_6_kills;
}

}

else if( level.chest_completed >= 1 )
{
if( level.chest_counting + level.chest_completed == 2   )
{
self.max_count = chest_2_kills;
}

if( level.chest_counting + level.chest_completed == 3   )
{
self.max_count = chest_3_kills;
}

if( level.chest_counting + level.chest_completed == 4   )
{
self.max_count = chest_4_kills;
}

if( level.chest_counting + level.chest_completed == 5   )
{
self.max_count = chest_5_kills;
}

if( level.chest_counting + level.chest_completed == 6   )
{
self.max_count = chest_6_kills;
}

}

wait 0.2;
self playsound( "chest_open");
wait 1;
self waittill( "chest_full" );

if( self.max_count == self.death_count || self.death_count >= 9000 )
{
level.chest_counting--;
self playsound( "chest_full") ;
wait 0.3;
self playsound( "chest_full") ;
wait 1;
self playsound( "chest_full2") ;
self playsound( "chest_close_lid" );
for(i=0;i<chest_clip.size;i++)
{
if(  self IsTouching( chest_clip[i] ) == true )
{
chest_clip[i] delete();
}
}

wait 1;
self playsound( "chest_full2" );
wait 2.1;
self delete();
self delete();
}

else if( self.max_count < self.death_count )
{
iprintlnbold( "death count exceeded due to timeout" );
}

else if( self.max_count > self.death_count )
{
level.chest_counting--;
self.death_count = -10;
self playsound( "chest_close_lid" );
wait 0.7;
self thread spawn_initial_model();
}

}


chest_death_count( last_origin, area_radius )
{
self notify( "chest_kill" );

self_origin = self.origin;
self.death_count++;

if( self.death_count == -9 || self.death_count >= 9000)
{
self.death_count--;
}

else if( self.death_count == 1)
{
level.chest_counting++;
self notify( "chest_activated" );
self thread chest_anims();
thread chest_death_fx( last_origin, self_origin, area_radius );
self thread time_out();
}

else if( self.death_count >= 2 && self.death_count <= self.max_count-1 )
{
thread chest_death_fx( last_origin, self_origin, area_radius );
self thread time_out();
}

else if( self.death_count == self.max_count )
{
self.death_count = 9000;
thread chest_death_fx( last_origin, self_origin, area_radius );
level.chest_completed++;
thread progres_check();
self notify( "time_out" );
wait 2;
self notify( "chest_full" );
}

}

time_out()
{
self endon( "chest_kill" );
self endon( "chest_full" );
self endon( "disconnect" );
self.timer = 999; //////////////////////////////// EDIT TIME-OUT TIMER HERE ////////////////////////////////////////////////

while(1)
{
if( self.timer <= 999 && self.timer >= 6 ) //////////////////////////////// AND HERE //////////////////////////////////////////////////
{
self.timer-= 5;
wait 5;
}

else if( self.timer <= 5 )
{
self.timer-= 0.2;
wait 0.2;


if( self.timer <= 0 )
{
self notify( "time_out" );
wait 2;
self notify( "chest_full" );
}

}
}
}

chest_death_fx( last_origin, self_origin, area_radius )
{
soul = Spawn( "script_model", last_origin+( 0,0,50) );
soul setmodel( "tag_origin" );
dist = DistanceSquared( last_origin, self_origin );
radius = area_radius * area_radius;
time = undefined;
if( dist >= radius* 0.66 )
{
time = 1.3;
}
else if(  dist <= radius* 0.65 && dist >= radius* 0.33 )
{
time = 1;
}
else if( dist <= radius* 0.32 )
{
time = 0.5;
}

PlayFxOnTag( level._effect["blst_chest_soul"], soul, "tag_origin" );
soul moveto( self_origin+( 0,0,30) , time, 0.5, 0);
wait time;
soul movez( 200, 0.4);
soul playsound( "soul_fly" );
wait 0.4;
soul delete();
}



progres_check()
{
if( level.chest_completed == level.chest_amount )
{
thread soul_chest_reward(); //////// THIS IS WHERE THE REWARD IS GIVEN WHEN ALL CHESTS ARE COMPLETED
level thread maps\_zombiemode_powerups::special_powerup_drop( self.origin );
level.chest_active = false; //// leave this line in here, it deactivates the thread in _zombiemode_spawner
}
}

soul_chest_reward()
{
self endon( "took_gun" );
self endon( "disconnect" );

reward_trigger = getentarray( "soul_chest_reward" , "targetname" );
players = get_players();
for(i=0;i<players.size;i++)
{
players[i].free_ray_gun = false;
reward_trigger[i] enable_trigger();
reward_trigger[i] thread reward_trigger( );
}
}

zb_thompson_rotate( zb_thompson )
{
self endon( "took_gun" );
self endon( "disconnect" );
while(1)
{
zb_thompson rotateyaw( 360 ,1.5 );
wait 1.5;
}
}

reward_trigger( )
{
player = undefined;

zb_thompson = Spawn( "script_model", self.origin );
zb_thompson.angles = (-30,0,-30);
zb_thompson setmodel( "weapon_zombie_thompson_smg" );
self thread zb_thompson_rotate( zb_thompson );

playfxontag (level._effect["powerup_on"], zb_thompson, "tag_origin");

self setCursorHint("HINT_NOICON");
self UseTriggerRequireLookAt();
self setHintString( "Press and hold &&1 to collect your reward" );

while(1)
{
self waittill( "trigger", player );
player.has_gun = false;
player.has_gun_upgr = false;

if( player.free_ray_gun == false)
{
player.free_ray_gun = true;
old_gun = player getcurrentweapon();

weaplist = player GetWeaponsListPrimaries();
for(i=0;i<weaplist.size;i++)
{
if( weaplist[i] == "zombie_thompson" )
{
player.has_gun = true;
}
else if ( weaplist[i] == "zombie_thompson_upgraded" )
{
player.has_gun_upgr = true;
}
}

if( player.has_gun == true )
{
player switchtoweapon( "zombie_thompson" );
player givemaxammo( "zombie_thompson" );
player playsound( "ammo_pickup" );
self notify( "took_gun" );
zb_thompson delete();
self delete();
break;
}

else if( player.has_gun_upgr == true )
{
player switchtoweapon( "zombie_thompson_upgraded" );
player givemaxammo( "zombie_thompson_upgraded" );
player playsound( "ammo_pickup" );
self notify( "took_gun" );
zb_thompson delete();
self delete();
break;
}

else if( weaplist.size <= 1 )
{
player giveweapon( "zombie_thompson" );
player switchtoweapon( "zombie_thompson" );
player playsound( "weap_pickup_plr" );
self notify( "took_gun" );
zb_thompson delete();
self delete();
break;
}

else if( weaplist.size >= 2 )
{
player takeweapon( old_gun );
player giveweapon( "zombie_thompson" );
player switchtoweapon( "zombie_thompson" );
player playsound( "weap_pickup_plr" );
self notify( "took_gun" );
zb_thompson delete();
self delete();
break;
}
}

else if( player.free_ray_gun == true )
{
iprintlnbold( "This one is not for you.." );
}
wait 0.1;
}
}
I suspect the problem may be with the mule kick interfering with the soul chest giving you a thompson after it's completed, but I'm not entirely sure. The powerup thats supposed to spawn doesnt even spawn either so I'm pretty stumped there. Any help is much appreciated

Here's the thread where bluntstuffy edited his script for me, just in case you wanna take a look:
http://ugx-mods.com/forum/index.php?topic=6254.0
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
What about it works, and what doesn't work? Is it only the reward at the end, or does nothing work anymore? any error's?
Be a bit more specific about what the issue is.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
What about it works, and what doesn't work? Is it only the reward at the end, or does nothing work anymore? any error's?
Be a bit more specific about what the issue is.
My bad. I get no errors and everything works EXCEPT the reward. I kill zombies in the radius, it does the animation, the set amount of kills works, and everything goes as its supposed to. But when I kill the set amount of zombie, I dont get my reward. No powerup, no thompson. Neither of them spawn at all, the green powerup fx thing doesnt either. It plays the sound to indicate that I killed all the zombies I needed to but thats it. However, the trigger that lets me pick up the gun still works but it just takes my current gun and im left with only one gun.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
Sounds like the weapon file isn't loaded ( and because of that the worldmodel also isn't precached ) in _zombiemode_weapons and dlc3_code. When you type give_all do you get the thompson?
Not sure about the powerup, do you have playable_area there?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
Sounds like the weapon file isn't loaded ( and because of that the worldmodel also isn't precached ) in _zombiemode_weapons and dlc3_code. When you type give_all do you get the thompson?
Not sure about the powerup, do you have playable_area there?
For the powerup, the playable_area was the problem. But now none of it's working. If I kill a zombie near it, nothing happens. No animation of the soul, nothing. Which is odd because it was working perfectly and I didnt change anything with it. The only changes I've made to my map since last time it was working are add a couple BO and BO2 weapons, download and install the files to fix the 400 fx error by MakeCents, and add the plauable area to the room with the soul chest in it.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
For installing the soul-chests you put some line's in your zone_source\mapname.csv, my guess is that those line's arent in there anymore after using MakeCents tut + file's to fix the 400fx error.
Make sure those line's are in there, and all fx's sounds etc are loaded..
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
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.
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 LinksHarryBo000[email protected]HarryBo21
there were problems with your thompson i pointed out on your other post a while back

you had its name wrong all over the place
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
there were problems with your thompson i pointed out on your other post a while back

you had its name wrong all over the place
Hmm...I dont recal a post about the thompson. It was working perfectly and I hadnt changed anything about it so my thompson code in the reward isnt the problem I dont think.
For installing the soul-chests you put some line's in your zone_source\mapname.csv, my guess is that those line's arent in there anymore after using MakeCents tut + file's to fix the 400fx error.
Make sure those line's are in there, and all fx's sounds etc are loaded..
Yeah I thought about that too. I'll take a look when I get home and let you know if I can get it working.

 
Loading ...