Jump to content

Recommended Posts

One of my characters perks is when theyre half health or lower, and they arent holding any weapons, their punches should set things on fire the same way torches do when you attack with them.  Ive searched through every game files i could that would help me but i dont know how to properly string together a function that works. Every time i try to load the mod the game  freezes  so obviously im not doing it right. Appreciate any help!

This was written from memory and on a phone, so only use it a guide :p

In your character's main function, put the following

inst:ListenForEvent("onhitother", function(inst, data) if inst.components.health and inst.components.health:GetPercent() <= 0.5 and not (inst.components.inventory and inst.components.inventory:GetEquippedItem("hands")) then

if data and data.target and data.target.components.burnable then

data.target.components.burnable:Ignite()

end end end)

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