LootTrapActor := actor { TriggerVolume: TriggerVolumeDevice = TriggerVolumeDevice{} PopupDialog: PopUpDialogDevice = PopUpDialogDevice{} # We need a way to give loot. Let's assume we have an Item Granter. # For simplicity, we'll just use a print statement to log the choice. # In a real game, you'd call ItemGranter.Grant(player, "Legendary_Auto_Rifle") # When the player clicks a button on the dialog, this event fires. # 'response' is either "Yes" or "No" (based on the buttons you set up). OnDialogResponse := func(response: string) { if (response == "Yes") { # Player said Yes! Give them loot. # Print("Player took the loot!") # Debugging } else { # Player said No! Give them a shock. # Print("Player got shocked!") # Debugging } } }