Jump to content

Recommended Posts

I'm trying to make a character that cuts trees but fast and
I don't know the line of code to do that, there's something ready, like damage
ex: inst.components.combat.damagemultiplier = 5
 or I will have to do from zero

 

 

Link to comment
Share on other sites

11 hours ago, Lendrio said:

I'm trying to make a character that cuts trees but fast and
I don't know the line of code to do that, there's something ready, like damage
ex: inst.components.combat.damagemultiplier = 5
 or I will have to do from zero

 

 

Inside your characters lau file under the common_postinit=function(inst), add the line: inst:AddTag("woodcutter")

The code should look something like below

 

-- This initializes for both the server and client. Tags can be added here.
local common_postinit = function(inst) 
    -- Minimap icon
    inst.MiniMapEntity:SetIcon( "character.tex" )

    -- Lets him chop wood fast like Woodie
    inst:AddTag("woodcutter")

Also for future reference, it would be easier to get help and assistance if you name what your problem is in the topic title.

Have fun.

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