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

Random PaP-Camos [like BO3]

broken avatar :(
Created 6 years ago
by fanmagic
0 Members and 1 Guest are viewing this topic.
3,833 views
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
BO3 Random PaP-Camos
_________________________________

I made this little script a few minutes ago for my upcoming map.
It will give you a random Pack a Punch camo on your gun like in BO3.
_________________________________

Open your _zombiemode_perks.gsc and find this function:
Code Snippet
Plaintext
third_person_weapon_upgrade( current_weapon, origin, angles, packa_rollers, perk_machine )

Replace the complete function with this:
Code Snippet
Plaintext
third_person_weapon_upgrade( current_weapon, origin, angles, packa_rollers, perk_machine )
{
// FM Randm PaP Camo
level.camo = randomintrange(0, 4);
// FM Randm PaP Camo

forward = anglesToForward( angles );
interact_pos = origin + (forward*-25);

worldgun = spawn( "script_model", interact_pos );
worldgun.angles  = self.angles;
worldgun setModel( GetWeaponModel( current_weapon ) );
PlayFx( level._effect["packapunch_fx"], origin+(0,1,-34), forward );

worldgun rotateto( angles+(0,90,0), 0.35, 0, 0 );
wait( 0.5 );
worldgun moveto( origin, 0.5, 0, 0 );
packa_rollers playsound( "packa_weap_upgrade" );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles+(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.35 );
worldgun delete();
wait( 3 );
packa_rollers playsound( "packa_weap_ready" );
worldgun = spawn( "script_model", origin );
worldgun.angles  = angles+(0,90,0);
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded", level.camo ) );
worldgun moveto( interact_pos, 0.5, 0, 0 );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles-(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.5 );
worldgun moveto( origin, level.packapunch_timeout, 0, 0);
return worldgun;
}

Next find this function:
Code Snippet
Plaintext
wait_for_player_to_take( player, weapon, packa_timer )

Near the end of the function you will see this line:
Code Snippet
Plaintext
player GiveWeapon( weapon+"_upgraded" );

Replace it with this line:
Code Snippet
Plaintext
player GiveWeapon( weapon+"_upgraded", level.camo );

Now open _zombiemode_weapons.gsc and find this function:
Code Snippet
Plaintext
weapon_give( weapon, is_upgrade )

Go to the end of the function and replace:
Code Snippet
Plaintext
self GiveWeapon( weapon ); 

With these lines:
Code Snippet
Plaintext
self GiveWeapon( weapon, level.camo ); 
_________________________________

That was the scripting part. Now you have to open your weaponfile for your upgraded weapon.
In this example I will use 'wind_staff_upgraded'.

Open your weaponfile with a text editor and search for this:
Code Snippet
Plaintext
gunModel2\\

Paste the name of your 2nd viewmodel inside the backslashes like this:
Code Snippet
Plaintext
gunModel2\t6_wpn_zmb_staff_air_view2\

Repeat this up to gunmodel4 so it look like this:
Code Snippet
Plaintext
gunModel2\t6_wpn_zmb_staff_air_view2\gunModel3\t6_wpn_zmb_staff_air_view3\gunModel4\t6_wpn_zmb_staff_air_view4\

Now do the same thing again, but search for this to change the worldmodel too:
Code Snippet
Plaintext
worldModel2\\

It will look like this:
Code Snippet
Plaintext
worldModel2\t6_wpn_zmb_staff_air_world2\worldModel3\t6_wpn_zmb_staff_air_world3\worldModel4\t6_wpn_zmb_staff_air_world4\

_________________________________

After that you have to create the models you named inside the file. I think that you'll know how to do that.
Copy and paste your xmodel, rename it to the name you gave them in the step above, open them with a text editor and change the material to your new pap camo.
If you need more help with this just ask down below. :)
_________________________________





_________________________________

And that's it! I hope you like it :)

Please give credits to:
fanmagic
Harry Bo21
Spoiler: click to open...
Here I learned how to change the models. Thank you ;)
https://www.ugx-mods.com/forum/index.php/topic,8558.msg93051.html#msg93051
Last Edit: April 03, 2018, 01:50:37 pm by fanmagic
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 19 March 2018
Last active: 6 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
Salem
×
Haaagaibmsirirla's Contact & Social Links
I hope mapper use this for some variety, thanks for making this :)
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 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
You should do one change to the script where you set the random camo as variable at the start of PaP'ing and set the variable on giveWeapon + on worldmodel (You don't have worldmodel stuff setup unless that is not possible in WaW) Also what is the _zombiemode_weapons.gsc part for? Curious. Good tutorial anyways, nicely laid out and easy to follow
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
You should do one change to the script where you set the random camo as variable at the start of PaP'ing and set the variable on giveWeapon + on worldmodel (You don't have worldmodel stuff setup unless that is not possible in WaW) Also what is the _zombiemode_weapons.gsc part for? Curious. Good tutorial anyways, nicely laid out and easy to follow
Thanks. :)
I also noticed that the worldmodels doesn't work.

I think that the function in _zombiemode_weapons.gsc is called when the player has two weapons, so i changed it there to choose a random camo too.
Code Snippet
Plaintext
primaries = player GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size >= 2 )
{
player maps\_zombiemode_weapons::weapon_give( weapon+"_upgraded" );
}

broken avatar :(
×
broken avatar :(
Location: usEarth
Date Registered: 30 July 2015
Last active: 3 years ago
Posts
118
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Current project: Afterlife
Signature
"The only time you should look back, is to see how far you've come."
Nice tutorial, will definitely keep this in mind later on  :)
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 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
Thanks. :)
I also noticed that the worldmodels doesn't work.

I think that the function in _zombiemode_weapons.gsc is called when the player has two weapons, so i changed it there to choose a random camo too.
Code Snippet
Plaintext
primaries = player GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size >= 2 )
{
player maps\_zombiemode_weapons::weapon_give( weapon+"_upgraded" );
}

Worldmodels can be fixed by just adding the camo variable in this line:
Code Snippet
Plaintext
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded" ) );
So it looks like:
Code Snippet
Plaintext
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded", variable ) );

But would require level variable so it carries over the multiple functions so you don't have mismatching models showing up, same with using _zombiemode_weapons.gsc. Did the same thing for Perish when I fixed the worldmodel issue like year ago
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Worldmodels can be fixed by just adding the camo variable in this line:
Code Snippet
Plaintext
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded" ) );
So it looks like:
Code Snippet
Plaintext
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded", variable ) );

But would require level variable so it carries over the multiple functions so you don't have mismatching models showing up, same with using _zombiemode_weapons.gsc. Did the same thing for Perish when I fixed the worldmodel issue like year ago
I'll add this to the tutorial later on. Thanks again :)
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 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'll add this to the tutorial later on. Thanks again :)

👌
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Worldmodels should work now. :)

 
Loading ...