Jump to content

Recommended Posts

Having many tags is the issue. I really want some other tags have an opportunity to plant seeds but it is only restricted by "plantkin"?
Can I have 2 restricted tags without removing "plantkin" one?
 

inst.components.deployable.restrictedtag = "plantkin"

 

Edited by Vlad Undying

Solution:
 

AddPrefabPostInit("seeds", function(inst)
	if GLOBAL.TheWorld.ismastersim then
		inst.components.deployable.restrictedtag = nil
		inst.components.deployable.IsDeployable = function(self,deployer)
			return deployer:HasTag("plantkin") or deployer:HasTag("canplantseeds")
		end
	end
end)

AddPrefabPostInit("veggies", function(inst)
	if GLOBAL.TheWorld.ismastersim then
		inst.components.deployable.restrictedtag = nil
		inst.components.deployable.IsDeployable = function(self,deployer)
			return deployer:HasTag("plantkin") or deployer:HasTag("canplantseeds")
		end
	end
end)

 

  • Like 1

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...