Granting Weapons on Eliminations
5. Granting Weapons on Eliminations
Now that youve set up your maps, the next step is to grant weapons when a player scores an elimination.
Now that you’ve set up your maps, the next step is to grant weapons when a player scores an elimination.
Now that you’ve set up your maps, the next step is to grant weapons when a player scores an elimination.
When a player scores an elimination, you want to apply these two rules:
- If the player is not at the highest weapon tier on their team, or all players are at the same weapon tier, promote them to the next weapon tier.
- Otherwise, if there is a player on their team at a lower weapon tier, promote that player instead.
This will ensure that players advance through weapons as a team, and no player will be more than one weapon ahead of or behind any of their teammates.
To do this, you’ll need to know when a player scores an elimination, then compare their weapon tier against all the other players on their team and promote a player based on the two rules above.
Follow these steps to grant weapons to players when they score an elimination.
- Add a new method
GiveNextWeaponto theteam_elimination_gameclass. This method grants a player a weapon whenever they or someone on their team scores an elimination based on the two rules above.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.