using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
limited_crash_pad_device := class(creative_device):
@editable
LimitCount:int = 3
@editable
LaunchText:string = "Hello"
@editable
IsLimited:logic = true
@editable
CrashPadDevice:crash_pad_device = crash_pad_device{}
var LaunchCount:int = 0
OnBegin<override>()<suspends>:void=
CrashPadDevice.LaunchedEvent.Subscribe(OnLaunch)
OnLaunch(Agent:agent):void=
Print(LaunchText)
if(IsLimited?):
set LaunchCount += 1
if(LaunchCount >= LimitCount):
CrashPadDevice.Disable()