Verse Library verse

01 Fragment

Assigns joining players to Prop or Hunter teams, granting appropriate abilities or hiding them.

verse-library/verse-prop-hunt-template-7-designing-your-island-in-unreal-editor-for-fortnite/01-fragment.verse

# This is a Verse script for Prop Hunt
# It runs when a player joins the game

# This function runs when a player joins
OnPlayerAdded := (player: Player) -> unit:
    # Give the player a random team
    # If the team is Prop, they hide
    # If the team is Hunter, they seek
    if player.GetTeam() == Team.Prop:
        # Hide the player as a prop
        # This is where Verse magic happens
        HidePlayerAsProp(player)
    else:
        # Give the hunter their weapon
        GiveHunterWeapon(player)

Comments

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