Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. MW3 Modding Support & Discussion
  3. GSC editing score help.

GSC editing score help.

Scheduled Pinned Locked Moved MW3 Modding Support & Discussion
gscgsc scripthelp
4 Posts 2 Posters 396 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • HazeOnPlutoniumundefined Offline
    HazeOnPlutoniumundefined Offline
    HazeOnPlutonium
    wrote on last edited by
    #1

    Hello,
    I have been working on gungame GSC script, the script will be ran on a default free for all match. I can't seem to figure out how to edit a players score but I need to edit the score when a player gets a double kill with a launcher.
    I am trying to avoid the count of multiples kills when a player gets kills with a rocket, I just want the first kill to count.
    Anyone have a idea of how to handle this edge case?

    1 Reply Last reply
    0
    • HazeOnPlutoniumundefined Offline
      HazeOnPlutoniumundefined Offline
      HazeOnPlutonium
      wrote on last edited by
      #2

      For anyone looking for a solution, I did not find a way to edit score yet. But I did come across a work around.

      init()
      {
          level.callbackplayerdamagestub = level.callbackplayerdamage;
          level.callbackplayerdamage = ::cancelDamage;
      }
      
      cancelDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
      {
         if (SOME LOGIC HERE)
         {
            iDamage = 0;
         }
      		
      self [[level.callbackplayerdamagestub]]( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset );
      }
      
      

      You can do logic in this callback function, such as canceling damage to a second target.

      1 Reply Last reply
      0
      • Sorexundefined Offline
        Sorexundefined Offline
        Sorex Contributor
        wrote on last edited by
        #3

        HazeOnPlutonium The score will be still registred

        1 Reply Last reply
        0
        • HazeOnPlutoniumundefined Offline
          HazeOnPlutoniumundefined Offline
          HazeOnPlutonium
          wrote on last edited by
          #4

          Sorex Mind elaborating?
          The current implementation works for me. Ill probably have to do more in-depth testing, but as of now I have found not real issues. The logic I have checks to see if the damage is being done with the correct weapon in the cycle, and if you kill someone with a rocket and someone else is standing next to them it will cancel the damage because the player will already be on the next weapon making the statement true eWeapon != eAttacker getWeapon(). I have tested this with all the launchers.

          1 Reply Last reply
          0

          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Donate