PGRData/Resources/Scripts/XHome/XDorm/XHomeChar/XHomeCharNode/XHomeCharSetCharInteractTriggerNode.lua
2022-12-26 14:06:01 +05:30

20 lines
645 B
Lua

local XHomeCharSetCharInteractTriggerNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode, "HomeCharSetCharInteractTrigger", CsBehaviorNodeType.Action, true, false)
function XHomeCharSetCharInteractTriggerNode:OnAwake()
if self.Fields == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
if self.Fields["Trigger"] == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
self.Trigger = self.Fields["Trigger"]
end
function XHomeCharSetCharInteractTriggerNode:OnEnter()
self.Node.Status = CsNodeStatus.SUCCESS
self.AgentProxy:SetCharInteractTrigger(self.Trigger)
end