I need help with a script. I want to change the rules for point earned when you kill someone to the following:
Someone kills 30 people in a row. Their pool is now 30. Me and my squadmate kill him, I get the final blow. My squad mate gets +1 point for the Kill assist and 1/2 the pool points for a total of +16 points. I get 2 points for killing him plus 1/2 the pool points for a total of +17 points.
Example 2:
I spawn kill someone. Since they have no "pool points" I only get 2 point for the kill, no bonus.
So far in the scoringCommon.py file:
Any help would be appreciated.
- When you kill someone you get 2 points (standard like today)
- You earn a "pool" that gets bigger and bigger for each person you kill (1 point per person you kill)
- When someone kills you you LOOSE all the points in your pool and they are shared amongst your killers
Someone kills 30 people in a row. Their pool is now 30. Me and my squadmate kill him, I get the final blow. My squad mate gets +1 point for the Kill assist and 1/2 the pool points for a total of +16 points. I get 2 points for killing him plus 1/2 the pool points for a total of +17 points.
Example 2:
I spawn kill someone. Since they have no "pool points" I only get 2 point for the kill, no bonus.
So far in the scoringCommon.py file:
Code:
# killed by enemy else: attacker.score.kills += 1 [B] attacker.score.NumOfKillsWhileAlive += 1 [/B] addScore(attacker, SCORE_KILL, SKILL) countAssists = True [B] if victim: addScore(attacker, victim.score.NumOfKillsWhileAlive/len(assists), SCORE_KILL, SKILL) [/B] # kill assist if countAssists and victim: for a in assists: assister = a[0] assistType = a[1] if assister.getTeam() != victim.getTeam(): # passenger if assistType == 0: assister.score.passengerAssists += 1 addScore(assister, SCORE_KILLASSIST_PASSENGER, RPL) [B]addScore(assister,victim.score.NumOfKillsWhileAlive/len(assists), RPL) [/B] # targeter elif assistType == 1: assister.score.targetAssists += 1 addScore(assister, SCORE_KILLASSIST_TARGETER, RPL) [B]addScore(assister,victim.score.NumOfKillsWhileAlive/len(assists), RPL) [/B] # damage elif assistType == 2: assister.score.damageAssists += 1 addScore(assister, SCORE_KILLASSIST_DAMAGE, RPL) [B]addScore(assister,victim.score.NumOfKillsWhileAlive/len(assists), RPL) [/B] # driver passenger elif assistType == 3: assister.score.driverAssists += 1 addScore(assister, SCORE_KILLASSIST_DRIVER, RPL) [B]addScore(assister,victim.score.NumOfKillsWhileAlive/len(assists), RPL) [/B] else: # unknown kill type pass [B] #reset victim's number of kills while alive [/B] [B]victim.score.NumOfKillsWhileAlive = 0[/B]
Comment