Modme Forums
Menu:

How do you change the property of barricades?

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: OrderAndDEATH
I want to change the window repair so it will give you more then just 10 points when you repair them. Is it possible?


ModmeBot:

Reply By: Symbo

OrderAndDEATH
I want to change the window repair so it will give you more then just 10 points when you repair them. Is it possible?

Maybe. You need to copy the the _zm_blockers.gsc in your mapname/script/zm folder, add it to your zone and usings. then find this function where you probably can change the cost:

function handle_post_board_repair_rewards( cost, zbarrier )
{
	self zm_stats::increment_client_stat( "boards" );
	self zm_stats::increment_player_stat( "boards" );		
	
	// 5% chance every 5 boards, with a 60 sec minimum time between repeats
	if( isDefined(self.pers["boards"] ) && self.pers["boards"] %10 == 0 )
	{
		self zm_audio::create_and_play_dialog( "general", "rebuild_boards" );
	}

	// set the score
	self.rebuild_barrier_reward += cost;
	if( self.rebuild_barrier_reward < level.zombie_vars["rebuild_barrier_cap_per_round"] )
	{
		self zm_score::player_add_points( "rebuild_board", cost );
		self zm_utility::play_sound_on_ent( "purchase" );
		
	}
	// general contractor achievement for dlc 2. keep track of how many board player repaired.
	if(isdefined(self.board_repair))
	{
		self.board_repair += 1;
	}
}


ModmeBot:

Reply By: mathfag
In the beginning of the function blocker_trigger_think the cost is defined and it seems you can define the cost as a kvp on the window prefab (or struct inside) like with doors.

so kvp = zombie_cost
value = 1000


cost = 10;
	if( isdefined( self.zombie_cost ) )
	{
		cost = self.zombie_cost; 
	}


but I'm not sure. Havn't tried it.


ModmeBot:

Reply By: OrderAndDEATH

mathfag
In the beginning of the function blocker_trigger_think the cost is defined and it seems you can define the cost as a kvp on the window prefab (or struct inside) like with doors. so kvp = zombie_cost value = 1000 cost = 10; if( isdefined( self.zombie_cost ) ) { cost = self.zombie_cost; } but I'm not sure. Havn't tried it.


It works to an extent, I tried it but Won't give me points since you already reach the barrier point limit, is there a way to remove that?


ModmeBot:

Reply By: mathfag

OrderAndDEATH
mathfag In the beginning of the function blocker_trigger_think the cost is defined and it seems you can define the cost as a kvp on the window prefab (or struct inside) like with doors. so kvp = zombie_cost value = 1000 cost = 10; if( isdefined( self.zombie_cost ) ) { cost = self.zombie_cost; } but I'm not sure. Havn't tried it. It works to an extent, I tried it but Won't give me points since you already reach the barrier point limit, is there a way to remove that?


level.zombie_vars["rebuild_barrier_cap_per_round"] = 10000;

is how many points you can get per round from rebuilding. _zm.gsc line 4374

so in your function main add

zombie_utility::set_zombie_var( "rebuild_barrier_cap_per_round", max_points);


ModmeBot:

Reply By: OrderAndDEATH

mathfag
OrderAndDEATH mathfag In the beginning of the function blocker_trigger_think the cost is defined and it seems you can define the cost as a kvp on the window prefab (or struct inside) like with doors. so kvp = zombie_cost value = 1000 cost = 10; if( isdefined( self.zombie_cost ) ) { cost = self.zombie_cost; } but I'm not sure. Havn't tried it. It works to an extent, I tried it but Won't give me points since you already reach the barrier point limit, is there a way to remove that? level.zombie_vars["rebuild_barrier_cap_per_round"] = 10000; is how many points you can get per round from rebuilding. _zm.gsc line 4374 so in your function main add zombie_utility::set_zombie_var( "rebuild_barrier_cap_per_round", max_points);


When I put the line of code into my function main it says that " max_points " is a uninitialized local variable, am I missing something?


ModmeBot:

Reply By: ihmiskeho

OrderAndDEATH
mathfag OrderAndDEATH mathfag In the beginning of the function blocker_trigger_think the cost is defined and it seems you can define the cost as a kvp on the window prefab (or struct inside) like with doors. so kvp = zombie_cost value = 1000 cost = 10; if( isdefined( self.zombie_cost ) ) { cost = self.zombie_cost; } but I'm not sure. Havn't tried it. It works to an extent, I tried it but Won't give me points since you already reach the barrier point limit, is there a way to remove that? level.zombie_vars["rebuild_barrier_cap_per_round"] = 10000; is how many points you can get per round from rebuilding. _zm.gsc line 4374 so in your function main add zombie_utility::set_zombie_var( "rebuild_barrier_cap_per_round", max_points); When I put the line of code into my function main it says that " max_points " is a uninitialized local variable, am I missing something?

Replace max_points with a number value. This will cap the amount of points you can get per round.