using { /Fortnite.com/Devices } using { /UnrealEngine.com/Temporary/Diagnostics } using { /Verse.org/Simulation } # This is our main script. It connects to a Prop Mover device. # We call this a "Device Script". MoveWithSpeed := class(creative_device): # This is the device we are controlling. # It must be a Prop Mover. # Drag the Prop Mover from the Outliner onto this slot in the Details Panel. @editable Mover: prop_mover_device = prop_mover_device{} # This is our User Option. # It is a number. Players can change it in the editor. # The default value is 10.0. @editable TravelSpeed: float = 10.0 # This function runs when the game starts. OnBegin(): void = # We enable the Prop Mover so it is ready to receive commands. Mover.Enable() # We tell the mover to travel at the speed defined by TravelSpeed. # The Prop Mover moves along the path set up in the editor. # SetTargetSpeed controls how fast it travels along that path. # note: prop_mover_device does not expose a velocity vector API; # SetTargetSpeed(float) is the closest real method available. Mover.SetTargetSpeed(TravelSpeed) # We start the mover moving forward along its path. Mover.Advance()