Modme Forums

How would you take certain points when dying etc?

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


ModmeBot:

Thread By: TCM
I was just randomly going through the points file I see where the case statements are talking about taking points for down,death etc, I was just wondering how would I go about taking say 1/4 of a players points for going down.


ModmeBot:

Reply By: Abnormal202

TCM
I was just randomly going through the points file I see where the case statements are talking about taking points for down,death etc, I was just wondering how would I go about taking say 1/4 of a players points for going down.


function take_away_extra_points_after_death()
{
	players = GetPlayers();
	foreach(player in players)
	{
		player thread wait_for_death();
	}
}
function wait_for_death()
{
	self waittill("death");

	points_to_take = (self.points / 4);
	self zm_score::minus_to_player_score( points_to_take );

	self wait_for_death();
}

try something like this


ModmeBot:

Reply By: Harry Bo21

Abnormal202
TCM I was just randomly going through the points file I see where the case statements are talking about taking points for down,death etc, I was just wondering how would I go about taking say 1/4 of a players points for going down. function take_away_extra_points_after_death() { players = GetPlayers(); foreach(player in players) { player thread wait_for_death(); } } function wait_for_death() { self waittill("death"); points_to_take = (self.points / 4); self zm_score::minus_to_player_score( points_to_take ); self wait_for_death(); } try something like this



int(self.points / 4)


ModmeBot:

Reply By: Abnormal202

Harry Bo21
Abnormal202 TCM I was just randomly going through the points file I see where the case statements are talking about taking points for down,death etc, I was just wondering how would I go about taking say 1/4 of a players points for going down. function take_away_extra_points_after_death() { players = GetPlayers(); foreach(player in players) { player thread wait_for_death(); } } function wait_for_death() { self waittill("death"); points_to_take = (self.points / 4); self zm_score::minus_to_player_score( points_to_take ); self wait_for_death(); } try something like this int(self.points / 4)


ModmeBot:

Reply By: TCM
Thank you guys for the reply <3


ModmeBot:

Reply By: TCM

Abnormal202
TCM I was just randomly going through the points file I see where the case statements are talking about taking points for down,death etc, I was just wondering how would I go about taking say 1/4 of a players points for going down. function take_away_extra_points_after_death() { players = GetPlayers(); foreach(player in players) { player thread wait_for_death(); } } function wait_for_death() { self waittill("death"); points_to_take = (self.points / 4); self zm_score::minus_to_player_score( points_to_take ); self wait_for_death(); } try something like this


Guess that was for full blown death, Not just being downed.


ModmeBot:

Reply By: Harry Bo21

util::waittill_any( "fake_death", "death", "player_downed" );


this is a silly way of doing this however, as you already lose points when you down, so this will make you just lose 1/4 "on top" of what youre already losing - and doesnt use the "callbacks" system, so will not even run on players that hotjoined mid game or were simply slow connecting

if you had 50,000 youd end up losing like 28,000 or something ridiculous


what you should "actually" do is modify the "designed to be modified" stats

column = 2;
	zombie_utility::set_zombie_var( "penalty_no_revive", 				0.10, 	true,	column );	// Percentage of money you lose if you let a teammate die
	zombie_utility::set_zombie_var( "penalty_died",						0.0, 	true,	column );	// Percentage of money lost if you die
	zombie_utility::set_zombie_var( "penalty_downed", 					0.05, 	true,	column );	// Percentage of money lost if you go down // ww: told to remove downed point loss

these are from _zm.gsc

copy paste these to your mapname gsc underneath

zm_usermaps::main();

and change to whatever


#using scripts\shared\ai\zombie_utility;


^ remember to include this




some people just refuse to read the existing code to find these things that already exist you see ( ohhh they claim to, yet they literally always miss these, and miss the callbacks - like on laststand, on death and on spawned... )