Jump to content

Trader component - can only give certain items?

Recommended Posts

I'm making a custom trading guy with "trader" component.

However, I can't give him prefabs that I want him to accept (let's say a bee).

Can't give here means no option to "give" when I hover the bee over the trader guy.

When I hover a meat or flint, cursor changes to "give".


How do I change this?

I looked at trader.lua and there's nothing about what limiting the trade.

I also looked at pigking.lua and it uses goldvalue in the "AcceptTest" function but my "AcceptTest" does not use goldvalue.


Edited by SenL
Link to comment
Share on other sites

I see. Whew so complex.

So, I added them all "tradable" component but see warnings in log

"component tradable already exists! "


I could ignore but is it hard to do "add tradable component if it does not yet exist"?


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

  • Create New...