Jump to content

Custom Character's Ability and Weapon Help


Recommended Posts

Hello everybody.

I'm creating my second Custom Character, using the ESCTemplate as base again.

I need help with two things:

  • How do I make a custom ability which the character will roll in a direction when the key is pressed?
  • How do I make a weapon deal increased damage each time it hits?

Thanks in advance!!! :yaypigs:

Link to comment
Share on other sites

For the first thing, this is already quite complicated, try to look for mods that do a similar thing and understand how they do it.

As for the second one, you can just add this in fn of the weapon:

inst.components.weapon:SetOnAttack(function(inst)
	inst.components.weapon.damage = inst.components.weapon.damage + 1
end)

This will increase the damage of the weapon by 1 each hit, change it to your liking.

If you want to save the damage value , you will need to add an onsave and onload function where the value is saved and restored.

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