Skip to content

Instantly share code, notes, and snippets.

@LionGet
Created September 16, 2023 13:15
Show Gist options
  • Save LionGet/46c677b2d712835ab13c91d6cc7da72a to your computer and use it in GitHub Desktop.
Save LionGet/46c677b2d712835ab13c91d6cc7da72a to your computer and use it in GitHub Desktop.
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 }
using { /Fortnite.com/Vehicles }
hello_world_device := class(creative_device):
FwdReset : event() = event(){}
UpwReset : event() = event(){}
var PlayerVehicle : [agent]fort_vehicle = map{}
@editable Spawners : []player_spawner_device = array {}
@editable Baller : vehicle_spawner_baller_device = vehicle_spawner_baller_device {}
@editable TripleSpeed : movement_modulator_device = movement_modulator_device {}
@editable FwdBoost : movement_modulator_device = movement_modulator_device {}
@editable UpwBoost : movement_modulator_device = movement_modulator_device {}
OnBegin<override>()<suspends>:void=
for (Spawner : Spawners):
Spawner.SpawnedEvent.Subscribe(OnPlayerSpawn)
Baller.AgentEntersVehicleEvent.Subscribe(MapFortVehicle)
Baller.AgentExitsVehicleEvent.Subscribe(UpwBoostStop)
Baller.OutOfEnergyEvent.Subscribe(FwdBooster)
# Apply 3x speed
OnPlayerSpawn(Agent:agent):void=
TripleSpeed.Activate(Agent)
Print("Triple Speed")
# MAP VEHICLE & UPW BOOST LOOP
MapFortVehicle(Agent:agent):void=
if (FortChar:=Agent.GetFortCharacter[],Vehicle:=FortChar.GetVehicle[]):
spawn{VehicleChecks(Vehicle,Agent)}
Print("Vehicle Checks Spawned")
if (not(Existing:=PlayerVehicle[FortChar])){}
if (set PlayerVehicle[Agent]=Vehicle){}
Print("Info: PlayerVehicle Mapped")
VehicleChecks(Vehicle:fort_vehicle, Agent:agent)<suspends>:void=
race:
block:
loop:
if (Vehicle.IsInAir[]):
UpwBoost.Activate(Agent)
Print("Vehicle In Air")
else:
Print("Vehicle Not In Air")
Sleep(1.0)
block:
UpwReset.Await()
UpwBoostStop(Agent:agent):void=
UpwReset.Signal()
FwdBooster():void=
for (Player->Vehicle:PlayerVehicle):
FwdBoost.Activate(Player)
Print("Forward Boost")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment