krylincy Posted August 18, 2020 Share Posted August 18, 2020 In my prefab i have a onPickup function if owner.components ~= nil and owner.components.inventory ~= nil then owner.components.inventory:SetCasket(inst) end The SetCasket function is added to the inventory component, the replica and the classified. but how can i trigger a change (on pickup) to the client? This will work fine for the host but the client didn't get this information. This function from the inventory should somehow update the inventory_replica, too local function SetCasket(self, casket) self.casket = casket end Any ideas would be great, thanks! Link to comment Share on other sites More sharing options...
penguin0616 Posted August 24, 2020 Share Posted August 24, 2020 (edited) I think net_entity should work for you. Just listen for whenever it is set, but I don't think the instance will be valid unless the client has an active instance of it as well. I'm guessing that shouldn't be a problem for your case though. Edited August 24, 2020 by penguin0616 2 Link to comment 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