Multiple Weapon Assignment Class
# fill this file with your verse-script
#simple class for multiple weapon assignments
#uses the spawn pad devices and item granters to route unique weapons to players.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation/Tags }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Teams }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse
#for how to create a verse device.
Loadout:= class<concrete>:
@editable
PSD:[]player_spawner_device = array{} #will grant items based on spawnpad(S) entered here.
#setup for an array type if needed.
@editable
Item_Spawner: item_granter_device = item_granter_device{}
PSD_Spawned():void =
for (PS1: PSD):
PS1.SpawnedEvent.Subscribe(LoadAssignment)
LoadAssignment (Agent: agent):void=
Item_Spawner.GrantItem(Agent)
# A Verse-authored creative device that can be placed in a level
Spawn_triggers := class(creative_device):
@editable
Loadout_groups:[]Loadout = array{}
OnBegin<override>()<suspends>:void=
for (LG : Loadout_groups):
LG.PSD_Spawned()