GSC editing score help.
-
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? -
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.
-
HazeOnPlutonium The score will be still registred
-
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 trueeWeapon != eAttacker getWeapon(). I have tested this with all the launchers.
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