Track Events When Players Stand Still
# Copyright (c) 2023 Floyd Splevans
# Licensed under the MIT License. See https://opensource.org/licenses/MIT for details.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
# This maximum amount of distance travelled between an update which will trigger a stand still event
StandStillMovePerSecondThreshold: float = 0.01
# Update 3 times per second, enough to detect standing still
PlayerStandStillUpdateFrequency: float = 0.333
# This class contains everything needed for tracking a given player
player_standstill_tracker := class():
# Keep a reference to the agent of this player
Agent: agent
# Keep a reference to the agent of this player
Character: fort_character
# Fires when player stands still
StandStillEvent: event() = event(){}
# Fires when player stops standing still
StopStandingStillEvent: event() = event(){}
# Player transform this simulation update
var CurrentTranslation: vector3 = vector3{}
# Toggles when player stand-stills are detected
var PlayerIsStandingStill<private>: logic = true
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.