Verse Library verse

11 Playing Effects On Idle Players

Runs an infinite loop to continuously monitor player movement and advance prop behavior until elimination.

extracted-snippets/documentation/en-us/fortnite/prop-hunt-03-playing-effects-on-idle-players-in-unreal-editor-for-fortnite/11-playing-effects-on-idle-players.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/prop-hunt-03-playing-effects-on-idle-players-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/prop-hunt-03-playing-effects-on-idle-players-in-unreal-editor-for-fortnite.md
# Section:    Playing Effects On Idle Players
# If the prop agent stops moving then race to see if the prop agent moves beyond the MinimumMoveDistance, the heartbeat timer completes, or the prop agent is eliminated.
RunPropGameLoop(PropAgent:agent)<suspends>:void =
Logger.Print("Starting prop agent game loop.")
# Loop forever through the prop behavior until the prop agent is eliminated or the player leaves the session.
loop:
# Wait until the prop agent moves less than the minimum distance, then advance.
PropAgent.AwaitStopMoving(MinimumMoveDistance)
Sleep(0.0)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in