DBNO Revive Infect Device
Module — 2 files
These files compile together (same module folder).
DBNO_Revive_Infect_Device.verse
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation/Tags }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Verse }
# Code developed by Dragon (dragonstudio.pro)
# View my FNC Maps: http://fortnite.com/@blze.dragon
# This code was created with assistance of FortniteCreativeGPT - ( www.fortnitecreativegpt.com )
# View FNC+GPT code structure creation : https://chat.openai.com/share/929e3ed6-8160-41af-b713-058b8e780601
# I was able to improve upon the structure provided by FNC+GPT and fully develop the code.
# Learn more about FortniteCreative+GPT and stay up to date on the latest news!
# FortniteCreative+GPT Discord: https://discord.gg/kwb3szRu3u
# Get help in all your creative needs from Unreal Engine to UEFN at The Creative Blok Discord!
# https://discord.com/invite/P5JU6gzUFV
# Devices Needed
# (1) Class Selector (For Hunter/Infector Class)
# (1) Class Designer (For Hunter/Infector Class)
# (1) Elimination Manager
# (1) Down but not Out Device
# (1) Teleporter
# (16) Player Spawn Pads (8 players max per team)
# (1) Team Setting and Inventory Device
DBNO_Revive_Infect_Device := class(creative_device):
@editable
DownButNotOutDevice: down_but_not_out_device = down_but_not_out_device{}
@editable
ClassSelectorDevice: class_and_team_selector_device = class_and_team_selector_device{}
@editable
EliminationManager: elimination_manager_device = elimination_manager_device{}tab
#This is optional - This will teleport the infected player to a new area before they revive and are switched.
@editable
InfectorTeleport: teleporter_device = teleporter_device{}
OnBegin<override>()<suspends>:void=
Print ("I am active")
DownButNotOutDevice.Enable
Print ("DBNO Active")
EliminationManager.Enable
Print ("Elim Manager Active")
# Subscribe to the elimination event to handle any specific actions upon player elimination
EliminationManager.EliminatedEvent.Subscribe(OnPlayerEliminated)
# Subscribe to the player revived event to switch the player to the opponent's team
DownButNotOutDevice.AgentDownedEvent.Subscribe(Teleport)
# Optional: Implement actions upon player elimination, if needed
OnPlayerEliminated(Agent:agent):void=
if(Fort := Agent.GetFortCharacter[]):
InfectorTeleport.Teleport(Agent)
DownButNotOutDevice.Down
Print("Player eliminated. Awaiting revival to switch teams...")
# This function is called when a player is revived. It then switches the player to the opponent's team.
Teleport(Agent:agent):void=
InfectorTeleport.Teleport(Agent)
DownButNotOutDevice.Revive(Agent)
# This action will switch the revived player to the specified class (and team).
ClassSelectorDevice.ChangeTeamAndClass(Agent)
Print(" Player revived and switched to infected team ")
Sign in to download module
Copy-paste each file above is always free.