Luneyl Posted February 22, 2020 Share Posted February 22, 2020 (edited) Trying to tweak existing mod for myself (make ability unlimited duration). The mod is: Homura Akemi changed code are in \scripts\components\skill_homura.lua (line 117) if self.left_time > 0 then --self.inst:ListenForEvent('homuraUI_fn_dirty', function() self:ForceEndSkill() end) TheInput:AddKeyDownHandler(PUELLA_MOD_SETTINGS.SKILLKEY, function() self:ForceEndSkill() end) --self.left_time = self.left_time - dt if self.left_time <= 0 then self:EndSkill() elseif self.inst.components.health:IsDead()then self:ForceEndSkill() end end It works in single player, but doesn't work when launching server (ability doesn't stop on key press). If I use self.inst:ListenForEvent('homuraUI_fn_dirty', function() self:ForceEndSkill() end) instead of TheInput:AddKeyDownHandler(PUELLA_MOD_SETTINGS.SKILLKEY, function() self:ForceEndSkill() end) ability stops fine on first use (local and server), but it breaks and doesn't reactivates any further unlit relog. What should I add to make it work properly? Any examples? Edited February 22, 2020 by Luneyl Link to comment https://forums.kleientertainment.com/forums/topic/115943-server-ignores-theinputaddkeydownhandler/ Share on other sites More sharing options...
CarlZalph Posted February 25, 2020 Share Posted February 25, 2020 That's because this mod is done improperly for a client-server setup. It should be using an RPC from the client to send to the server that the event happened for the skill use, and the server should do its actions there. If a server needs to communicate any information back to the client, then it should use a netvar. Link to comment https://forums.kleientertainment.com/forums/topic/115943-server-ignores-theinputaddkeydownhandler/#findComment-1310706 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now