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

Making box show Dual Wield guns in box, different xmodel to worldmodel

broken avatar :(
Created 11 years ago
by ProRevenge
0 Members and 1 Guest are viewing this topic.
2,732 views
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
Signature
Stranded
Nacht Der Untoten: Reimagined
Encampment
Encampment V2: BO3 Mod

Mapper and Weapon Porter - I release what I can of my work for the community to enjoy :)
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
Ok I have Dual Wield M1911's, and I made a model of the 2 guns close to each other like how dual wield shows in the box in BO1/2, just a static xmodel, now how do I make the box show this in the box for the M1911 rather than the guns worldmodel? would it be a script or something?
Marked as best answer by ProRevenge 11 years ago
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
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.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
This doesn't seem to be working for me
Im using this:

Code Snippet
Plaintext
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 );
}


}

the model is precached like so:

Code Snippet
Plaintext
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" );
}

Now the model itself, shows up as just one gun in asset viewer, but in xmodel utils it looks like so:




And in Maya:




Sorry for too much info, rather give a lot so anyone helping knows whats up.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 5 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 LinksXxMrPotatoxXpsn_hackedlobbies4uvinnyz500
is your weaponname m1911 or bo2_m1911...
Code Snippet
Plaintext
 // Added code
if( rand == "m1911" )
model setmodel( "bo2_m1911_boxmodel" );

make sure your weaponfile matches up to the name
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
it does, my weaponfile is "m1911"
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Did you try putting the model in your map somewhere on the ground and trying again?

If not, did you include the model in your mod.csv?

To troubleshoot possible script issues, add a iprintlnbold(rand); above the if line you added. And/or one under the if line like so:

Code Snippet
Plaintext
		// 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 );
}
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
Oh my god do I feel silly.

When I added the second gun model in in maya, it changed material name to my scene for some reason, so when I converted it, one gun had a different material, that didn't exist, so appeared blank in game, making it LOOK like 1 gun, so it was working all along...  :lol: :poker:


+1 to you all anyway for helping :)
Last Edit: September 03, 2015, 05:54:47 pm by ProRevenge

 
Loading ...