Zimzagoon Posted February 16, 2019 Share Posted February 16, 2019 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! Link to comment Share on other sites More sharing options...
chromiumboy Posted February 21, 2019 Share Posted February 21, 2019 This was written from memory and on a phone, so only use it a guide 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) Link to comment Share on other sites More sharing options...
Zimzagoon Posted February 23, 2019 Author Share Posted February 23, 2019 @chromiumboy days of trying to figure out how to do this and you solved all my issues!!<333 thank you so much!! Link to comment Share on other sites More sharing options...
chromiumboy Posted February 23, 2019 Share Posted February 23, 2019 Glad to hear it helped! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.