Verse Library verse

01 Snippet

Links a button to simultaneously spawn a driftboard and an item for players upon interaction.

extracted-snippets/community/snippets/Vd0/fortnite-button-for-driftboard-spawner-and-item-spawner/01-snippet.verse

# Source URL: https://dev.epicgames.com/community/snippets/Vd0/fortnite-button-for-driftboard-spawner-and-item-spawner
# Local doc:  epic-docs/community/snippets/Vd0/fortnite-button-for-driftboard-spawner-and-item-spawner.md
  using { /Verse.org/Simulation }
  using { /Fortnite.com/Devices }
  button_spawner := class<concrete>(creative_device):
  @editable
  DrifboardSpawner:vehicle_spawner_device = vehicle_spawner_device{}
  @editable
  ItemSpawner:item_spawner_device = item_spawner_device{}
  @editable
  SpawnButton:button_device = button_device{}
  OnBegin<override>()<suspends>:void=
  SpawnButton.InteractedWithEvent.Subscribe(SpawnDriftboard)
  SpawnButton.InteractedWithEvent.Subscribe(SpawnItem)
  SpawnDriftboard(Player:player):void=
  DrifboardSpawner.RespawnVehicle()
  SpawnItem(Player:player):void=
  ItemSpawner.SpawnItem(Player)

  Expand code  Copy full snippet(20 lines long)
* ```
  Begin Map
     Begin Level
        Begin Actor Class=/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Device_item_SpawnerV2_C Name=Device_item_SpawnerV2_C_1 Archetype=/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Device_item_SpawnerV2_C'/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Default__Device_item_SpawnerV2_C'
           Begin Object Class=/Script/Engine.StaticMeshComponent Name="StaticMeshComponent0" Archetype=/Script/Engine.StaticMeshComponent'/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Default__Device_item_SpawnerV2_C:StaticMeshComponent0'
           End Object
           Begin Object Class=/Script/Engine.BoxComponent Name="BoundingBoxComponent" Archetype=/Script/Engine.BoxComponent'/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Default__Device_item_SpawnerV2_C:BoundingBoxComponent'
           End Object
           Begin Object Class=/Script/Engine.StaticMeshComponent Name="EditorOnlyStaticMeshComponent" Archetype=/Script/Engine.StaticMeshComponent'/Game/Creative/Devices/ItemSpawnerProp/Device_item_SpawnerV2.Default__Device_item_SpawnerV2_C:EditorOnlyStaticMeshComponent'
           End Object

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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