So I am creating a team manager that controls the general flow of the a race. And I have set an array of checkpoints, I want to keep the player respawn on the last checkpoint that he passed and so I want to teleport the player checkpoint in the completed checkpoint. But even when i saw that the creative_prop has a MoveTo and a TeleportTo, i can’t use them, as is show an error “Unknown member TeleportTo
in player_checkpoint_device
”.
Code:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Verse }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
team1_manager := class(creative_device):
@editable
RaceCheckpoints : []race_checkpoint_device = array{}
@editable
var PlayerSpawners : []player_spawner_device = array{}
@editable
var Team1Player1Respawn : player_checkpoint_device = player_checkpoint_device{}
@editable
var TeamScore : score_manager_device = score_manager_device{}
var Player1Checkpoint : int = 0
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
Print("Team1 Manager Started")
if:
RaceCheckpoints[Player1Checkpoint].CheckpointCompletedEvent.Subscribe(ClearedCheckpoint)
ClearedCheckpoint<private> (Agent : agent):void=
Print("Cleared Checkpoint")
set Player1Checkpoint += 1
if:
RaceCheckpoints[Player1Checkpoint].CheckpointCompletedEvent.Subscribe(ClearedCheckpoint)
Transform := RaceCheckpoints[Player1Checkpoint].GetTransform()
#Error here, I can't seem to teleport the creative device
Team1Player1Respawn.TeleportTo[Transform.Translation, Transform.Rotation]
if:
# This is where the if conditions are put
Player1Checkpoint = RaceCheckpoints.Length
then:
TeamScore.Activate(Agent)