Announcement

Collapse
No announcement yet.

Need help with a script: "Pool" bonus point system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with a script: "Pool" bonus point system

    I need help with a script. I want to change the rules for point earned when you kill someone to the following:
    1. When you kill someone you get 2 points (standard like today)
    2. You earn a "pool" that gets bigger and bigger for each person you kill (1 point per person you kill)
    3. When someone kills you you LOOSE all the points in your pool and they are shared amongst your killers
    Example 1:

    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]
    Any help would be appreciated.

  • #2
    Re: Need help with a script: "Pool" bonus point system

    Thats a really cool idea but as I dont know that language I cant really help you I hope it works...

    Comment


    • #3
      Re: Need help with a script: "Pool" bonus point system

      Why would any one then want to stay alive for long if they lose the entire pool to someone else when they die ?

      Why not reward the one who stay alive killing a lot others rather than the one who might get lucky killing him once ?

      Surpose you try this ...

      1st kill :
      1 point put into the players pool

      Every kill after 1st kill until killed :
      points in pool = points in pool * 1.5

      When killed :
      66% of own pool points is transfered to normal score as a reward for staying alive for so long.
      33% of pool points is giving to killer as a kill reward.
      Pool is reset !


      When game ends :
      66% of own pool points is transfered to normal score as a reward for staying alive for so long.

      (66% and not 100% ensures that the game continues to the end and no one try to hide saving their points)

      I created a script a few month ago altering the score giving during the game perhaps this can help you http://bf2.fun-o-matic.org/index.php...ThreatAndWorth

      Comment

      Working...
      X