Hello guys so I try to make a custom signal remote where if i click the remote then a timer will run here is my code
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }
See Create Your Own Device Using Verse for how to create a verse device.
A Verse-authored creative device that can be placed in a level
team1_class_healer := class(creative_device):
var seconds : int = 1
var iteration : int = 1
var isRunning : logic = false
@editable
SignalRemoteGreen : signal_remote_manager_device = signal_remote_manager_device{}
HandlePrimaryButton( P : agent) : void =
if (F := P.GetFortCharacter[]) :
set isRunning = true
F.Hide()
HandelSecondaryButton( P : agent) : void =
if (F := P.GetFortCharacter[]) :
set isRunning = false
F.Show()
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
# TODO: Replace this with your code
SignalRemoteGreen.PrimarySignalEvent.Subscribe(HandlePrimaryButton)
Print("{iteration}")
if(isRunning = true):
for (X := 0..100):
set iteration += seconds
Sleep(1.0)
Print("{iteration}")
i dont know why but even thogh i havent click the remote the timer always counting at the start of the game please help