Jump to content

Recommended Posts

When upgraded, William follower (Faithe) will help him fight things. But if she attacks frogs, they'll attack her back, and cause the game to crash because she doesn't have the inventory component. However, if I DO give her the inventory component, it f***s up the container component, since she also functions as one. I looked trough the thief component, which the frogs have to steal items from the inventory - but that component specifies "if victim.components.inventory". Is there a way to resolve this issue, without having to make it so Faithe either can't fight or doesn't function as a container?

Im not very good at it, but maybe add "if" statement at start where "thief" will check  if it should even try to execute rest of function on   Faithe, including inventory component check. Myabe it should look for forbidden tag? 

Edited by EmielRegis

Im not very good at it, but maybe add "if" statement at start where "thief" will check  if it should even try to execute rest of function on   Faithe, including inventory component check. Myabe it should look for forbidden tag? 

I found the problem:

    elseif victim.components.container then        local item = itemtosteal or victim.components.inventory:FindItem(function(item) return not item:HasTag("nosteal") end)

So, basically it's like, "Oh, it's a container, not the inventory? Eh, still gonna use the inventory component!"

I'm now seeing if removing the inventory part will fix it.

 

EDIT: Yep, removing that fixed Faithe.

Edited by Mr. Tiddles

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
×
  • Create New...