UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Swag_Chesse_xo1 on June 02, 2018, 03:01:49 am

Title: BluntStuffys soul chest glitch
Post by: Swag_Chesse_xo1 on June 02, 2018, 03:01:49 am
When finishing a soul box, the clip(targetname , soul_chest _clip) around the soul box does not disappear. So after its gone, you cant move through where the clip should have been deleted. Is this a glitch? Or is the clip not supposed to be deleted?
Title: Re: BluntStuffys soul chest glitch
Post by: Noahst on July 08, 2018, 02:56:07 pm
Yeah i run into this issue too
Title: Re: BluntStuffys soul chest glitch
Post by: isaacscott935 on July 08, 2018, 03:06:19 pm
When finishing a soul box, the clip(targetname , soul_chest _clip) around the soul box does not disappear. So after its gone, you cant move through where the clip should have been deleted. Is this a glitch? Or is the clip not supposed to be deleted?

You can just add this to the script where the soul chest disappears:

Code Snippet
Plaintext
clip Delete();
Title: Re: BluntStuffys soul chest glitch
Post by: Noahst on July 08, 2018, 03:19:48 pm
Where at in it?
Title: Re: BluntStuffys soul chest glitch
Post by: isaacscott935 on July 08, 2018, 03:37:04 pm
I haven't actually got the feature in my map, but inside of the final IF statement in the function:

Code Snippet
Plaintext
chest_anims()

add:

Code Snippet
Plaintext
chest_clip Delete();

So, the whole chest_anims() function would look like this:

Code Snippet
Plaintext
chest_anims()
{
/////////////////////////////////////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE /////////////////////////////////////////////////////////////////////////////
chest_1_kills = 12;
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;
chest_clip Delete();
}


}

chest = Spawn( "script_model" , self.origin-(0,0,16) );
chest.angles = self.angles;
chest SetModel( "blst_soul_chest_active" );
chest.animName = "blst_chest_anim";
chest UseAnimTree(#animtree);
chest SetAnim(%blst_soul_chest_open);
chest playsound( "chest_close_lid" );
wait 0.2;
chest playsound( "chest_open");
self chest_idle_fx( chest );
wait 2;
self thread soul_chest_idle_anims( chest );
self waittill( "chest_full" );

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

chest_clip[i] delete();
}
}
chest clearAnim( self.idle_anim ,0);
chest SetAnim(%blst_soul_chest_close_full);
wait 1;
chest playsound( "chest_full2" );
wait 2.1;
chest 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;
chest playsound( "chest_close_lid" );
chest clearAnim( self.idle_anim ,0);
chest SetAnim(%blst_soul_chest_close_notfull);
wait 0.7;
chest delete();
self thread spawn_initial_model();
}

}
Title: Re: BluntStuffys soul chest glitch
Post by: Noahst on July 08, 2018, 03:43:14 pm
Excellent! Thanks a bunch
Title: Re: BluntStuffys soul chest glitch
Post by: isaacscott935 on July 08, 2018, 04:39:58 pm
Make sure the OP marks mine as the best answer so it appears as solved.

Also, a +1 respect would be greatly appreciated.
Title: Re: BluntStuffys soul chest glitch
Post by: BluntStuffy on July 08, 2018, 06:46:02 pm
the code to delete the clip is allready there:

Code Snippet
Plaintext
	for(i=0;i<chest_clip.size;i++)
{
if(  chest IsTouching( chest_clip[i] ) == true )
{

chest_clip[i] delete();
}

The trigger radius ( the red-box ) needs to be completely inside the clip, otherwise it doesn't work..
Title: Re: BluntStuffys soul chest glitch
Post by: Noahst on July 08, 2018, 06:48:48 pm
Well My issue is I hae the radius in a separate area of the box for geographical reasons
Title: Re: BluntStuffys soul chest glitch
Post by: BluntStuffy on July 08, 2018, 06:54:02 pm
Well My issue is I hae the radius in a separate area of the box for geographical reasons

Make the trigger target the clip ( select trigger, select clip -> press "W" ), so you know wich clip belongs to wich chest.
Then instead of the Original lines to delete the clip do this:

Code Snippet
Plaintext
clip = getent( self.target, "targetname" );
clip delete();




btw, if you do what Isaacscott935 says, you delete all the clips of all the chests at once ( it's an array ):
Code Snippet
Plaintext
chest_clip = getentarray( "soul_chest_clip" , "targetname" );
Title: Re: BluntStuffys soul chest glitch
Post by: isaacscott935 on July 08, 2018, 07:23:42 pm
Make the trigger target the clip ( select trigger, select clip -> press "W" ), so you know wich clip belongs to wich chest.
Then instead of the Original lines to delete the clip do this:

Code Snippet
Plaintext
clip = getent( self.target, "targetname" );
clip delete();






btw, if you do what Isaacscott935 says, you delete all the clips of all the chests at once ( it's an array ):
Code Snippet
Plaintext
chest_clip = getentarray( "soul_chest_clip" , "targetname" );
Sorry Bluntstuffy. I didn’t read your full script.
Title: Re: BluntStuffys soul chest glitch
Post by: BluntStuffy on July 08, 2018, 07:35:54 pm
Sorry Bluntstuffy. I didn’t read your full script.

np, i was just pointing it out to them so they know that might cause another issue wich would be confusing
Title: Re: BluntStuffys soul chest glitch
Post by: klevi on July 09, 2018, 07:49:18 pm
last time that i checked - they  works
Title: Re: BluntStuffys soul chest glitch
Post by: Harry Bo21 on July 10, 2018, 03:08:13 am
last time that i checked - they  works
and as was stated

they 'work' when the clip covers the model, his clip - did not, so needed a target
Title: Re: BluntStuffys soul chest glitch
Post by: Swag_Chesse_xo1 on July 13, 2018, 07:49:54 pm
So Who Deserves Best Answer?
Title: Re: BluntStuffys soul chest glitch
Post by: Harry Bo21 on July 14, 2018, 01:15:35 am
Stuffy obv