Hide props with Verse by pressing a button device

Hey, recently I had trouble using prop manipulators to hide props in a round based game. It would work 50% of the times after round 1, so I came up with a simple solution, creating a device using verse. First you need to create the device, you can check how to create it here. Then just open the file and put this code in:

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

prop_disappear := class(creative_device):

    @editable
    var prop : creative_prop = creative_prop{}

    @editable
    MyButtonDevice:button_device = button_device{}

    @editable
    Trigger:trigger_device = trigger_device{}

    OnBegin<override>()<suspends>:void=
        MyButtonDevice.InteractedWithEvent.Subscribe(OnButtonInteractedWith)
        Trigger.TriggeredEvent.Subscribe(OnTriggeredEvent)

    OnButtonInteractedWith(InAgent:agent):void=
        prop.Hide()

    OnTriggeredEvent(InAgent: void):void=
        prop.Show()

Now all you need to do is take this device you created, select a button device, a prop and a trigger. The button will hide the selected prop for the rest of the round when pressed and the trigger should be set to trigger at the start of the game so that everytime a round starts the prop goes back to normal.
This was a simple but efective way to fix my game, idk if the OnTriggeredEvent was done right but it worked so I wanted to share in case someone has the same problem. We should all help each other so if you have any questions feel free to ask and I’ll try to answer asap. Here is the island code in case you want to check how I implemented it:

6875-9093-0867

1 Like