44 lines
1.0 KiB
Lua
44 lines
1.0 KiB
Lua
---@class BP_DamageStab_C:AActor
|
|
---@field SM_Obstacle_01_A_Spike UStaticMeshComponent
|
|
---@field Box UBoxComponent
|
|
---@field DefaultSceneRoot USceneComponent
|
|
---@field Damage float
|
|
--Edit Below--
|
|
local BP_DamageStab = {};
|
|
|
|
|
|
function BP_DamageStab:ReceiveBeginPlay()
|
|
self.SuperClass.ReceiveBeginPlay(self);
|
|
if UGCGameSystem.IsServer() then
|
|
UGCSystemLibrary.BindBeginOverlapFunc(self.Box, self.OverlapPlayer, self)
|
|
end
|
|
end
|
|
|
|
function BP_DamageStab:OverlapPlayer(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult)
|
|
if OtherActor and OtherActor.PlayerKey and OtherActor:IsAlive() then
|
|
UGCGameSystem.ApplyDamage(OtherActor, self.Damage, nil, nil, EDamageType.UGCCustomDamageType + 1)
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
--[[
|
|
function BP_DamageStab:ReceiveEndPlay()
|
|
self.SuperClass.ReceiveEndPlay(self);
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_DamageStab:GetReplicatedProperties()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
--[[
|
|
function BP_DamageStab:GetAvailableServerRPCs()
|
|
return
|
|
end
|
|
--]]
|
|
|
|
return BP_DamageStab; |