25 lines
694 B
Lua
25 lines
694 B
Lua
|
---@class BP_KillBox_C:AActor
|
||
|
---@field Box UBoxComponent
|
||
|
---@field DefaultSceneRoot USceneComponent
|
||
|
--Edit Below--
|
||
|
---@type BP_KillBox_C
|
||
|
local BP_KillBox = {};
|
||
|
|
||
|
function BP_KillBox:ReceiveBeginPlay()
|
||
|
self.SuperClass.ReceiveBeginPlay(self);
|
||
|
if UGCGameSystem.IsServer() then
|
||
|
self.Box.OnComponentBeginOverlap:Add(self.Box_OnComponentBeginOverlap, self);
|
||
|
end
|
||
|
end
|
||
|
|
||
|
function BP_KillBox:Box_OnComponentBeginOverlap(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult)
|
||
|
local PlayerKey = OtherActor.PlayerKey
|
||
|
if PlayerKey then
|
||
|
UGCSystemLibrary.RespawnPlayer(PlayerKey)
|
||
|
end
|
||
|
return nil;
|
||
|
end
|
||
|
|
||
|
-- [Editor Generated Lua] function define End;
|
||
|
|
||
|
return BP_KillBox;
|