I’m trying to write a verse code that will activate the prop and barrier device when the player teleports, but I get the following
Error Code:move_floor.verse(34,46, 34,55) : Script error 3509: This function parameter expects a value of type agent->void, but this argument is an incompatible value of type type{_():void}.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
move_floor := class(creative_device):
@editable Floor_Cube : creative_prop= creative_prop{} @editable FBarrier: barrier_device= barrier_device{} @editable BBarrier: barrier_device= barrier_device{} @editable Teleporter : teleporter_device = teleporter_device{} @editable var MovingTime : float = 2.0 Gamestert()<suspends>:void= Transform := Floor_Cube.GetTransform() PositionX := Transform.Translation.X PositionY := Transform.Translation.Y PositionZ := Transform.Translation.Z Rotation := Transform.Rotation NowPosition := vector3{X := PositionX, Y:= PositionY, Z := PositionZ} NewRotation := Rotation.ApplyYaw(0.0) NewPosition := vector3{X := PositionX, Y:= PositionY+2200.0, Z := PositionZ} Floor_Cube.MoveTo(NewPosition,NewRotation,MovingTime) FBarrier.MoveTo(NewPosition,NewRotation,MovingTime) BBarrier.MoveTo(NewPosition,NewRotation,MovingTime) OnBegin<override>()<suspends>:void= Teleporter.TeleportedEvent.Subscribe(Gamestert)