using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/SpatialMath }
RandomSpawnDevice := class(creative_device):
@editable
DeviceStormController : advanced_storm_controller_device = advanced_storm_controller_device{}
@editable
Trigger : trigger_device = trigger_device{}
TeleportDevice(MaybeAgent:?agent):void =
var SpawnPoints : []vector3 = array{
vector3{ Forward := 5340.000000, Left := -2000.000000, Up := 400.000000 },
vector3{ Forward := 5000.000000, Left := -5000.000000, Up := 400.000000 }
}
DeviceStormController.TeleportTo(SpawnPoints[0], DeviceStormController.GetTransform().Rotation)
OnBegin<override>()<suspends>:void =
Trigger.TriggeredEvent.Subscribe(TeleportDevice)
What I want to do is move the advanced_storm_controller_device to a random position in my array at the start of the game, but I can’t use the TeleportTo function
On line 18 (where I use the function it gives me the errors: No overload of the function `TeleportTo` matches the provided arguments (:vector3,:rotation). Could be any of:
function (/Fortnite.com/Devices/storm_controller_device:)TeleportTo(:vector3,:rotation) in package Fortnite
function (/Fortnite.com/Devices/storm_controller_device:)TeleportTo(:transform) in package Fortnite(3509)
(Also tried with extension function arguments (:advanced_storm_controller_device,:tuple(vector3,rotation)))(3509)