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

Perk Randomizer (Update 11-6-14, v1.2)

broken avatar :(
Created 9 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
4,138 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
This script/tut will randomize the location of the perk machines you chose, on spawn, and if you want, per round. This script was designed to work with the traditional perk prefab setups, and can be adjusted/edited easily to handle additional perk machines.

Random perks

v1.1 add ability to randomize every so many defined rounds
v1.2 fixed glitch where occasionaly a machine didn't come back and made more efficient

After downloading _mc_perk_randomizer and extracting the files:
1. Copy the map_source folder to your root folder
2. Open you map and insert a prefab that correlates to your perk machine from the _mc_perkrandomizer_origiins folder
3. If you want a machine to randomize, then place a prefab as shown in the struct_placement jpeg

 - In each prefab is a script_origin with kvps for that perk machine
 - There is a custom one that you will have to edit for your perk
 - If the machines in your map have different targetnames then you will have to change them
 - Only add script_origins for the machines you want to be a part of the randomizing
4. Put the _mc_perk_randomizer.gsc in your root/mods/nazi_zombie_mapname/maps/ folder
5. Place the following
   
Code Snippet
Plaintext
maps\_mc_perk_randomizer::init();
    under
   
Code Snippet
Plaintext
maps\_zombiemode::main();
    in your nazi_zombie_mapname.gsc
6. Compile, and build your mod with the new _mc_perk_randomizer.gsc selected

Done

===================================
Editing the script
===================================
There is a level.randomize_rounds variable that if set to a number other than 0 will randomize the perks every that many rounds.

The clips are different for each machine so if you want them to go with the machine you will have to make them script_brushmodels with a target name of each script_origin prefabs target + "_clip". Example: "vending_phd_clip" Otherwise they will stay there. You may want to add another clip to each machine that will cover all issues...

==================================
How this script works (overview)
==================================
This script looks for the prefabs, a script_origin with the targetname of "random_perks" and adds another script_origin.
Then sets that script_origin to the model as tag_origin.
Then for each of those tag_origins it looks for specific things, like triggers, and models, and script_brushmodels and links them to itself, if they are close enough to it.
Then it takes each one and runs a function that moves it and randomly selects another place, script_origin, to go to.
If you changed level.randomize_rounds to 1 then it will wait till the round ends and then do it again.

==================================
kvp and important script explanations
==================================
The prefabs that include the script_origins have the kvp target of the models kvp targetname and the same script_string
If the machine's trigger_use, you are using, has a different targetname than "zombie_vending", "zombie_vending_black_ops", "zombie_vending_mulekick", "zombie_vending_staminup", "zombie_vending_phd", or "zombie_vending_deadshot", you will have to add, in the script, this:

Code Snippet
Plaintext
		otherperk = GetEnt( otherperkstriggertargetname, "targetname" ); 
if(distance(self.origin,otherperk.origin)<100){
otherperk enablelinkto();
otherperk linkto(self);
return otherperk;
}
below this:
Code Snippet
Plaintext
		deadshot = GetEnt( "zombie_vending_deadshot", "targetname" );
if(distance(self.origin,deadshot.origin)<100){
deadshot enablelinkto();
deadshot linkto(self);
return deadshot;
}

Be sure to change otherperk to the perk name, all occurrences, and otherperkstriggertargetname to the targetname of the trigger_use for that perk.

Thanks to pcmodder for testing and confirming that it works with bams new bo perks.

This only works with perks that use the traditional prefab setup. This does not work with Harry's perks. Script placer Z 2.0 uses Harry's perks so it won't work if you used that script placer either.
Last Edit: August 21, 2015, 01:29:29 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 22 October 2014
Last active: 8 years ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
_FrosTy's Groups
_FrosTy's Contact & Social Linksfrostyonsteam_FrosTy_FrosTy
Sweet man, that looks awesome. Would give some maps a more playable features as we would have to actually look for the perks rather then after a while  playing the map we know where everything is! Good Work!
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
Sweet man, that looks awesome. Would give some maps a more playable features as we would have to actually look for the perks rather then after a while  playing the map we know where everything is! Good Work!

Thanks! budygogo33 on ZM requested it, so I figured I would share.
Last Edit: November 02, 2014, 01:10:56 am by MakeCents

 
Loading ...