
Posts
643
Respect
261Add +1
Forum Rank
Zombie Enslaver
Primary Group
Mapper
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!

![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has released one or more maps to the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |

![]() | Has released one or more maps to the UGX-Mods community. |
treasure_chest_weapon_spawn( chest, player )
{
assert(IsDefined(player));
// spawn the model
model = spawn( "script_model", self.origin );
model.angles = self.angles +( 0, 90, 0 );
floatHeight = 40;
//move it up
model moveto( model.origin +( 0, 0, floatHeight ), 3, 2, 0.9 );
// rotation would go here
// make with the mario kart
modelname = undefined;
rand = undefined;
number_cycles = 40;
for( i = 0; i < number_cycles; i++ )
{
if( i < 20 )
{
wait( 0.05 );
}
else if( i < 30 )
{
wait( 0.1 );
}
else if( i < 35 )
{
wait( 0.2 );
}
else if( i < 38 )
{
wait( 0.3 );
}
if( i+1 < number_cycles )
{
rand = treasure_chest_ChooseRandomWeapon( player );
}
else
{
rand = treasure_chest_ChooseWeightedRandomWeapon( player );
}
/#
if( maps\_zombiemode_tesla::tesla_gun_exists() )
{
if ( i == 39 && GetDvar( "scr_spawn_tesla" ) != "" )
{
SetDvar( "scr_spawn_tesla", "" );
rand = "tesla_gun";
}
}
#/
// Added code
if( rand == "m1911" )
model setmodel( "bo2_m1911_boxmodel" );
// Normal code
else
{
modelname = GetWeaponModel( rand );
model setmodel( modelname );
}
}
init()
{
init_weapons();
init_weapon_upgrade();
init_pay_turret();
init_weapon_cabinet();
treasure_chest_init();
level thread add_limited_tesla_gun();
level.box_moved = false;
PrecacheModel( "bo2_m1911_boxmodel" );
}


// Added code
if( rand == "m1911" )
model setmodel( "bo2_m1911_boxmodel" );
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
// Added code
iprintlnbold(rand);
if( rand == "m1911" ){
iprintlnbold("I found the m1911 and should be setting the model");
model setmodel( "bo2_m1911_boxmodel" );
}
// Normal code
else
{
modelname = GetWeaponModel( rand );
model setmodel( modelname );
}

![]() | Has released one or more maps to the UGX-Mods community. |

