Attaching Damage Zone to 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
BubbleGunDamageDevice := class(creative_device):
# The player spawner to activate the verse script.
@editable
PlayerSpawner : player_spawner_device = player_spawner_device{}
# The damage zone that is attache to the player.
@editable
DamageZone : damage_volume_device = damage_volume_device{}
# Determins how far away from the player the damage zone will be placed.
@editable
var DamageZoneOffset : 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.