Item Shop Device
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# Device Configuration:
# 1. Set the 'Cashier' Conditional Button Device's Key Item to use the currency type you want (Gold, etc).
# 2. Set the HUD Message Device to 'Message Recipient: Triggering Player'.
# 3. Set the Button Device to the desired Interact Time.
# 4. Add the Item being purchased to the Item List of the Item Granter.
shop_device := class(creative_device):
@editable
Cashier: conditional_button_device = conditional_button_device{}
@editable
HUDMessage: hud_message_device = hud_message_device{}
@editable
ShopItems: []shop_item = array{}
MakeMessage<localizes>(Text: string): message = "{Text}"
OnBegin<override>()<suspends>:void=
ShopSetup()
ShopSetup(): void =
for (Item : ShopItems):
Item.Init(Self)
ShowHUDMessage(Agent: agent, Text: string): void =
HUDMessage.SetText(MakeMessage(Text))
HUDMessage.Show(Agent)
shop_item := class<concrete>():
var VerseDevice: shop_device = shop_device{}
@editable
ItemName: string = "Item"
@editable
ItemCost: type{X: int where X >= 0} = 10
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.