Flagging melee damage
Posted: Wed Sep 04, 2019 3:38 am
This is mainly aimed at Nels, but anyone else is always welcome to jump in...
So I'm working on Gun Game and I'm concerned on how to deal with something. I'd like to add the ability for admins to use a single melee weapon that is given to all players for the entire match (along with the normal progression of weapon levels). If you manage to kill someone with your melee weapon you gain an extra level and if someone kills you with their melee then you lose a level.
That's all fine and good but now I am trying to work out how to filter the kills done with a melee weapon. How would you begin to go about this Nels? I need to know when melee is used no matter what the melee weapon is that's being used.
Edit: I worked this out at 2am this morning. Woke up thinking about the problem and had a potential solution so I just got up and coded it. I'm assigning a special damage type to the selected melee weapon when it's awarded to the player. Now I can monitor for that damage type on Scorekills and add the bonus/punishments when needed. The code is complex (for my skill level) but it's coming together.
So I'm working on Gun Game and I'm concerned on how to deal with something. I'd like to add the ability for admins to use a single melee weapon that is given to all players for the entire match (along with the normal progression of weapon levels). If you manage to kill someone with your melee weapon you gain an extra level and if someone kills you with their melee then you lose a level.
That's all fine and good but now I am trying to work out how to filter the kills done with a melee weapon. How would you begin to go about this Nels? I need to know when melee is used no matter what the melee weapon is that's being used.
Edit: I worked this out at 2am this morning. Woke up thinking about the problem and had a potential solution so I just got up and coded it. I'm assigning a special damage type to the selected melee weapon when it's awarded to the player. Now I can monitor for that damage type on Scorekills and add the bonus/punishments when needed. The code is complex (for my skill level) but it's coming together.