Creating a Flashback Ability
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Characters }
using { /Fortnite.com/FortPlayerUtilities }
flashback_device := class(creative_device):
@editable
RemoteManager : signal_remote_manager_device = signal_remote_manager_device{}
var AgentMap : [agent]transform = map{}
OnBegin<override>()<suspends>:void=
RemoteManager.PrimarySignalEvent.Subscribe(UseFlashback)
RemoteManager.SecondarySignalEvent.Subscribe(SetLocation)
UseFlashback(Agent : agent):void=
if {Agent.Respawn(AgentMap[Agent].Translation, AgentMap[Agent].Rotation)}
SetLocation(Agent : agent):void=
if:
FortCharacter := Agent.GetFortCharacter[]
set AgentMap[Agent] = FortCharacter.GetTransform()
then:
Print("Location Set: {FortCharacter.GetTransform().Translation} {FortCharacter.GetTransform().Rotation}")