I would like to retrieve the value of the person who launches a custom map (the host).
I would like that when I start my game, only I can collect 3 weapons.
is it possible?
Thank you for your help.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Teams }
using { /Fortnite.com/Game }
using { /Fortnite.com/Playspaces }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A Verse-authored creative device that can be placed in a level
game_manager := class(creative_device):
var PlayerMap : [player]int = map{}
@editable
var WeaponGranters : []item_granter_device = array{}
@editable
var Sentries : []sentry_device = array{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
InitPlayers()
InitPlayers() : void=
Playspace: fort_playspace = GetPlayspace()
AllPlayers: []player = Playspace.GetPlayers()
if (FirstPlayer : player = AllPlayers[0]):
if (FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
Print("Grant Weapon to First Player")
GrantWeapon(FirstPlayer, 0)
GrantWeapon(FirstPlayer, 1)
GrantWeapon(FirstPlayer, 2)
GrantWeapon(Player : player, WeaponTier: int) : void=
Print("to grant Weapon")
if (ItemGranter := WeaponGranters[WeaponTier]):
Print("granted")
ItemGranter.GrantItem(Player)