# If you only want ONE large trigger zone instead of five individual coins, # replace the CoinTriggers array with a single trigger_device field. using { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } obby_manager_simple := class(creative_device): @editable CoinTrigger : trigger_device = trigger_device{} var CoinCount : int = 0 TotalCoins : int = 5 OnBegin() : void = # Subscribe once to the single zone trigger CoinTrigger.TriggeredEvent.Subscribe(OnCoinCollected) OnCoinCollected(Agent : agent) : void = set CoinCount += 1 Print("Coin Collected! Total: {CoinCount}") if (CoinCount = TotalCoins): Print("YOU WIN!")