Jump to content

Adding Component Broken randomly? [help]


Recommended Posts

I have this code in my modmain;

Quote

AddPrefabPostInitAny(function(inst)
    if not inst:HasTag("weapon") then
          return
    end
    if not GLOBAL.TheWorld.ismastersim then
        return
    end
    inst:AddComponent("poison_trait")
end)

It never once bugged out until today, randomly breaking and not applying the component to any weapon in the world, I removed the global ismaster sim line condition code and it worked partially however the game isn't really recognizing the component being changed.
What do I do to fix this?
By recognizing I mean it is literally unable to be updated, the component has a boolean and it cannot be read by some other components or in my case, widgets.

Normally this all worked fine before today.

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...