Top Down View Support Device
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/Characters }
# A Verse-authored creative device that can be placed in a level
track_player_manager := class(creative_device):
@editable
_CameraRoot: creative_prop = creative_prop{}
@editable
_OtherRoot: creative_prop = creative_prop{}
@editable
_OffsetX : float = 0.0
@editable
_OffsetY : float = 0.0
@editable
_OffsetZ : float = 0.0
var _CurrentRotation : rotation = rotation{}
### OnBegin
OnBegin<override>()<suspends>:void=
Offset:vector3 = vector3{X:=_OffsetX, Y:=_OffsetY, Z:=_OffsetZ}
## add jumped event
Players : []player = GetPlayspace().GetPlayers()
if(Player : player = Players[0]):
if(FortniteCharacter : fort_character = Player.GetFortCharacter[]):
FortniteCharacter.JumpedEvent().Subscribe(OnPlayerJumped)
UpdateRotationValue()
## start update loop
spawn{UpdateTargetPosition(Offset)}
### process for jump
OnPlayerJumped(the_player:fort_character):true=
UpdateRotationValue()
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.