using { /Fortnite.com/AI }
using { /Fortnite.com/Characters }
using { /Verse.org }
using { /Verse.org/Colors }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
NPC_down := class(creative_device):
@editable_number(float):
MinValue:=option{0.0},
MaxValue:=option{600.0}
DownTime:float = 20.0
@editable
NPCdevice : npc_spawner_device = npc_spawner_device{}
@editable
DownDevice : down_but_not_out_device = down_but_not_out_device{}
OnBegin<override>()<suspends>: void =
SpawnedAgent := NPCdevice.SpawnedEvent.Await()
loop:
DownDevice.AgentDownedEvent.Await()
spawn{OnAgentDowned(SpawnedAgent)}
Sleep(0.0)
OnAgentDowned<private>(Agent: agent)<suspends>: void =
Sleep(DownTime)
DownDevice.Revive(Agent)
it doesn’t work in game so does it work with npc’s ?