Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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 890 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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