Jump to content

Changing prototyper.trees


Recommended Posts

I'm trying to make prototyper, tha will be able to change prototyper.trees, but it's not working right. It's not changing. 

	if not inst.components.bo_powered:IsEmpty() then 
    inst:AddComponent("prototyper")
    inst.components.prototyper.onturnon = onturnon
    inst.components.prototyper.onturnoff = onturnoff
    inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.CRITTERLAB
	inst.components.prototyper.onactivate = onactivate
	else
	inst:AddComponent("prototyper")
    inst.components.prototyper.onturnon = onturnon
    inst.components.prototyper.onturnoff = onturnoff
    inst.components.prototyper.trees = TUNING.PROTOTYPER_TREES.SCIENCEMACHINE
	inst.components.prototyper.onactivate = onactivate
	end

It's allways working as CRITTERLAB and never changes to SCIENCEMACHINE.

  • Like 1
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...