Attaching Mutator Zone To A Player
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters}
using { /UnrealEngine.com/Temporary/SpatialMath}
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# A Verse-authored creative device that can be placed in a level
PlayerMutatorDevice := class(creative_device):
# The player spawner to activate the verse script.
@editable
PlayerSpawner : player_spawner_device = player_spawner_device{}
# The mutator zone that is attached to the player.
@editable
MutatorZone : mutator_zone_device = mutator_zone_device{}
# determines how far away from the player the mutator zone will be placed.
@editable
var MutatorZoneOffset : float = 500.0
OnBegin<override>()<suspends>:void=
# Wait until the player spawns to execute the loop.
SpawnedAgent := PlayerSpawner.SpawnedEvent.Await()
if:
# Getting the Fort Character of the spawned player.
PlayerCharacter := SpawnedAgent.GetFortCharacter[]
then:
loop:
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.