Jump to content

Need some help with AddPrefabPostInit


Recommended Posts

Heya! Need some help with AddPrefabPostInit. My code is here:

AddPrefabPostInit(
    "axe",
   function(inst)
      if GLOBAL.TheWorld.ismastersim
			then
		if inst:AddComponent("tool") then 
		inst.components.tool:SetAction(ACTIONS.CHOP, 0.5)
			end
		end
    end
)

The problem is that I now can't cut trees with axe :/ .What am I doing wrong?

1gxezs.gif

Edited by makar5000
  • 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...