-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstantRespawn.verse
33 lines (27 loc) · 1.05 KB
/
InstantRespawn.verse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using {/Fortnite.com/Devices }
using {/Verse.org/Simulation }
using {/UnrealEngine.com/Temporary/Diagnostics }
using {/Fortnite.com/Teams}
using {/Verse.org/Simulation}
using {/Fortnite.com/Characters}
using {/Verse.org/Random}
using {/Fortnite.com/Game}
using {/Fortnite.com/FortPlayerUtilities}
using {/UnrealEngine.com/Temporary/SpatialMath}
InstantRespawn := class(creative_device):
respawnposition: vector3=vector3{X:= 250.00, Y:= 0.01, Z:= 161.9}
@editable
ElimMachine : elimination_manager_device = elimination_manager_device{}
@editable
TeleporterTeam1 : teleporter_device = teleporter_device{}
@editable
TeleporterTeam2 : teleporter_device = teleporter_device{}
NowRespawn(Agent: agent)<suspends>:void=
Sleep(0.1)
Agent.Respawn(respawnposition, rotation{})
TeleporterTeam1 .Teleport(Agent)
TeleporterTeam2 .Teleport(Agent)
SelfEliminated(Agent:agent):void=
spawn{NowRespawn(Agent)}
OnBegin<override>()<suspends>:void=
ElimMachine.EliminatedEvent.Subscribe(SelfEliminated)