OnRemoteClicked(Agent: agent) <suspends>: void =
Sleep(3.0)
TeleportToLobby(Agent)
If I execute this action and click the remote, I get teleported instantly without the 3-second delay.
Does anyone know how I can get that to work?
Here is all the code in case you need it for understanding
using {/Fortnite.com/Characters}
using {/Fortnite.com/Playspaces}
using {/Fortnite.com/UI}
using {/UnrealEngine.com/Temporary/SpatialMath}
using {/UnrealEngine.com/Temporary/Diagnostics}
using {/UnrealEngine.com/Temporary/UI}
using {/Verse.org/Simulation}
using {/Verse.org/Random}
using {/Fortnite.com/Devices}
using {/Verse.org/Simulation}
Shop_Remote := class(creative_device):
@editable RemoteManager : signal_remote_manager_device = signal_remote_manager_device{}
@editable Hud_Message : hud_message_device = hud_message_device{}
@editable Teleporter : teleporter_device = teleporter_device{}
OnBegin<override>()<suspends>:void=
RemoteManager.PrimarySignalEvent.Subscribe(TeleportToLobby)
OnRemoteClicked(Agent: agent) <suspends>: void =
Sleep(3.0)
TeleportToLobby(Agent)
TeleportToLobby(Agent : agent) : void =
Playspace : fort_playspace = GetPlayspace()
AllPlayers : []player = Playspace.GetPlayers()
if (MyPlayer : player = AllPlayers[0]):
if (Mine1 : fort_character = MyPlayer.GetFortCharacter[]):
Teleporter.Teleport(Agent)