skittles sour Posted November 29, 2021 Share Posted November 29, 2021 I added a component action that, when I was testing locally, was available, but when I uploaded it to the server and try to do it on a client, was not. Has anyone experienced this before? The specific action in question is trying to make wortox souls give-able to revive corpses: AddComponentAction("USEITEM", "inventoryitem", function(inst, doer, target, actions, right) if inst:HasTag"reviver" and target and target:HasTag"player" and target:HasTag"corpse" then -- wortox soul would have the reviver tag table.insert(actions, inst.replica.stackable and inst.replica.stackable:IsStack() and GLOBAL.ACTIONS.GIVEALLTOPLAYER or GLOBAL.ACTIONS.GIVETOPLAYER) end end) Locally, when I hover a soul as an active item over a corpse, the "give" option appears. But as a client, when I hover it over a corpse, no actions are suggested. Link to comment https://forums.kleientertainment.com/forums/topic/135718-component-action-available-locally-but-not-as-client/ Share on other sites More sharing options...
skittles sour Posted November 30, 2021 Author Share Posted November 30, 2021 I've been having two similar problems that are like the one I just posted - one is trying to make booster shots usable by Wanda (since in our custom game mode everybody takes health penalty); and the other one is trying to make watering can fillable by ocean water. In all three cases, when I was testing locally, it was fine, but when I am playing as a client connected to the server, it wasn't. The "use" option doesn't appear over a boosters shot when you're Wanda. And as for the watering can, it's a bit different. My character enters the dolongaction state, but at the end of it, the watering can is not filled, but my character would not say the speech for a failed action... Link to comment https://forums.kleientertainment.com/forums/topic/135718-component-action-available-locally-but-not-as-client/#findComment-1518219 Share on other sites More sharing options...
DecDuck Posted December 1, 2021 Share Posted December 1, 2021 Are you sure the function is being called on all clients? As in, where are you putting this code? (Which file, where in the file, etc) 1 Link to comment https://forums.kleientertainment.com/forums/topic/135718-component-action-available-locally-but-not-as-client/#findComment-1518319 Share on other sites More sharing options...
skittles sour Posted December 1, 2021 Author Share Posted December 1, 2021 Please excuse me. I checked and rechecked when you asked and discovered that inside an if-statement I had "if not GLOBAL.TheNet:GetIsMasterSimulation() then return end". Now this explains why the actions weren't being added on the client. But do you have any ideas about the watering can problem... where the watering can is ocean-fillable locally, but when as a client, the action does not seem to be registered on the server. I am clicking the "fill" action when hovering watering can above the ocean, and as I am walking towards the shore, I paused and had ThePlayer:GetBufferedAction(), and sure enough it returned nil. I'm really confused by this. Link to comment https://forums.kleientertainment.com/forums/topic/135718-component-action-available-locally-but-not-as-client/#findComment-1518449 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