using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/FortPlayerUtilities }
using { /Fortnite.com/Vehicles }
See Create Your Own Device Using Verse | Unreal Editor for Fortnite Documentation | Epic Developer Community for how to create a verse device.
A Verse-authored creative device that can be placed in a level
Spawn_Rastro := class(creative_device):
@editable
Rastro:damage_volume_device = damage_volume_device{}
var InitialPos:vector3 = vector3{X:=-75.0,Y:=0.0,Z:=0.0}
FollowPlayer()<suspends> : void =
loop:
if (PlayerList := GetPlayspace().GetPlayers(), FortniteCharacter := PlayerList[0].GetFortCharacter[]):
Transform : transform = FortniteCharacter.GetTransform()
PlayerRotation := FortniteCharacter.GetViewRotation()
Rastro.MoveTo(Transform, 0.1)
else:
break
Print("Following")
OnBegin<override>()<suspends>:void=
FollowPlayer()