Skip to content

Instantly share code, notes, and snippets.

@LionGet
LionGet / game_manager_device.verse
Last active September 4, 2023 06:28
DBNO Teleporter system to teleport the player who gets a kill to a teleporter. File 2 has comments. File 1 is the same code without comments.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Playspaces }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }
using { /UnrealEngine.com/Temporary/Diagnostics }
game_manager_device:=class(creative_device):
@editable DBNO : down_but_not_out_device = down_but_not_out_device {}
using { /Fortnite.com/Game }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation/Tags }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/UI }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Colors }
@LionGet
LionGet / trap_device.verse
Last active October 19, 2023 22:17
Trap Mechanic
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
trap_device := class(creative_device):
# Put all of your spawners in this array which maps fort_char to custom class
@editable Spawners : []player_spawner_device = array{}
# Trigger is the trap
@LionGet
LionGet / gist:9b6b7a25d4915bc2875bba50176c3bbe
Last active October 20, 2023 08:09
Boiler Plate animations for spell/ability activations
# ANIMATION DEVICE
animation_device := class(creative_device):
# EDITABLES
# Notes: Index0 = InitTransition | Index1 = ChargeUp | Index2 = CastComplete
@editable VFXarray : []creative_prop_asset = array{}
@editable SFXarray : []audio_player_device = array{}
# EVENTS
CancelEvent : event() = event(){}
# ULTIMATE UI
CreateUIForPlayer(Ultimate: int):canvas=
UltimateWidget.SetText(UltimateText(Ultimate))
MyCanvas : canvas = canvas:
Slots := array:
canvas_slot:
Anchors := anchors{Minimum := vector2{X := 0.4, Y := 0.7}, Maximum := vector2{X := 0.6, Y := 0.0}}
Offsets := margin{Top := 100.0, Left := 0.0, Right := 0.0, Bottom := 0.0}
Alignment := vector2{X := 0.5, Y := 0.5}
SizeToContent := false
@LionGet
LionGet / gist:8a015d12ee3ba9e6f04631ed3be28957
Created October 22, 2023 17:44
Creature class with attack interface
creature:=class<abstract>:
Stats:stats
Attack:attack
stats:=class:
Health:float
Shield:float
attack:=interface():
Attack():void
@LionGet
LionGet / arc_advance.verse
Created October 30, 2023 19:02
+1 on Zmak Move Prop In Arc
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Devices/CreativeAnimation }
using { /UnrealEngine.com/Temporary/SpatialMath }
ArcAdvanced := class<concrete>:
@editable TimeBetweenPoints : float = 0.1
@editable AmountOfPoints : int = 500
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
moving_direction := enum:
None
Front
Back
@LionGet
LionGet / gist:9ac553289ba6a93554fd33d387efaa66
Last active November 6, 2023 01:36
Floating Damage Numbers
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/UI }
using { /Verse.org/Assets }
using { /Verse.org/Random }
Materials := module:
@LionGet
LionGet / util.verse
Last active November 21, 2023 15:07
Extension of Teleporter Device - Teleport Agent to Location with Validation & Reattempts
#==========================================================
# Teleport Agent to Location with Validation & Reattempts #
#==========================================================
(Teleporter:teleporter_device).TeleportAgent<public>(Agent:agent,Translation:vector3,Rotation:rotation)<suspends>:void=
# MaxAttempts = How many times teleport will attempt to find a new location before failing
# **Warning: Each attempt increases function duration by 1 frame at minimum
# Radius = The radius of the area in which the teleport will reattempt to find a new location
MaxAttempts:int=3
Radius:float=50.0
#