Verse Library verse

02 Snippet

Assigns a weapon to a player agent based on a tier parameter and handles conditional binding.

extracted-snippets/documentation/en-us/fortnite/team-elimination-3-subscribing-to-player-events-in-verse/02-snippet.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/team-elimination-3-subscribing-to-player-events-in-verse
# Local doc:  epic-docs/documentation/en-us/fortnite/team-elimination-3-subscribing-to-player-events-in-verse.md
GrantWeapon(InPlayer : ?agent, WeaponTier : int) : void=
Print("Granting Player a weapon of Tier {WeaponTier}")
if(ItemGranter := WeaponGranters[WeaponTier], GrantedPlayer := InPlayer?):

Comments

    Sign in to vote, comment, or suggest an edit. Sign in