UGX-Mods

Call of Duty: Black Ops 3 => Tutorial Desk => Scripting => Topic started by: death_reaper0 on June 17, 2019, 05:06:15 am

Title: Ancient Evil Styled Challenge System
Post by: death_reaper0 on June 17, 2019, 05:06:15 am
This is a system ive made that adds challenges to your map, the challenges are designed to work like the bo4 map "Ancient Evil"

how they work:
any player can purchase a challenge from buyable points (price increases slightly after some rounds)
all players have 2 minutes to do as the challenge says, doing so earns "challenge points"
when player has enough of these they can be redeemed for randomised rewards depending on the ammount the player has
reward can include points, guns or powerups (can be customised as you want)

script files:


https://mega.nz/#!OBpxSCwK!nKlEJ7DySAvbXftdyW0JCj3yEosuw2cFL1YUd9234rU (https://mega.nz/#!OBpxSCwK!nKlEJ7DySAvbXftdyW0JCj3yEosuw2cFL1YUd9234rU)instructions to install are in the zip file within a text file



RADIANT PART
in your map make a "script_stuct" and give it the targetname "podium_challenge"
this is where a player will go to buy a challenge, you can have as many as you want

create 4 more "script_stuct" and give it the targetnames
"podium_challenge_redeem_0"



"podium_challenge_redeem_1"



"podium_challenge_redeem_2"



"podium_challenge_redeem_3"

these are where player redeems their rewards from, "podium_challenge_redeem_0" is player 1, "podium_challenge_redeem_1" is player 2 etc
you can also have as many of these as you want





ADDING/CHANGING  REWARDS
near the top of the _zm_ancient_evil_challenges.gsc file you can find a bunch of lines looking like this
Code Snippet
Plaintext
	add_challenge_reward(1,				level.zombie_powerups["nuke"].model_name,				&spawn_powerup,		"nuke");
these are what adds rewards to the system
the "1" is what level of reward it is, should always be 1-4
the "level.zombie_powerups["nuke"].model_name" is the name of the model for the reward, this example will get the model of the nuke powerup
 "&spawn_powerup" is the name of the function that is run when this reward is taken, this example is for spawning powerups
"nuke" is the information passed on the the function in the part before, in this example its "nuke" because its a nuke powerup
another example is this
Code Snippet
Plaintext
	add_challenge_reward(2,				getweapon("shotgun_pump").worldModel,					&free_gun,			getweapon("shotgun_pump"));
this one will be a tier 2 reard, with the model of the KRM shotgun, running the give weapon function with the information of the krm weapon
i hope this is easy to understand if you want to change any of these rewards, or even add new ones, theres no limit to how many you can have, but you must have at least 1 reward per tier
ADDING/CHANGING  CHALLENEGES
near the top of the _zm_ancient_evil_chenges.gsc file you can find some lines that look like this
Code Snippet
Plaintext
	add_challenege("Anchored Down",		&challenege_anchored,		"Don't Move");
these lines add new challenges to the system
the "Anchored Down" is the name of the challenge that apears when active
the"&challenege_anchored" is the function that runs when the challenge is active
"Don't Move" is the description that apears under the challenge name
you would require some knowhow of scripting for you to make custom ones of these, they are threaded by the level, so if you want it threaded by players you will have to set it up to thread to players in the function.
to add "power" when a player does whatever you deem required, thread this
Code Snippet
Plaintext
player thread add_ancient_evil_challenge_power(power);
this will set up all the tings required, it wont add if its over the limit so dont worry about that. power is on a range of 1-100 so make sure you dont add to much at once
if anything isnt working or is confusing let me know and i'll try and fix as necicarry
Title: Re: Ancient Evil Styled Challenge System
Post by: Sterglaster on June 10, 2020, 12:56:09 am
Hey man, do you know how could I add a new challenge for killing zombies in a specific zone? Im new to scripting and I need some help. Thanks