Naidingo Posted February 8, 2015 Share Posted February 8, 2015 Is there a way to make it so your character takes less damage when hit? Like passively wearing armor. Link to comment Share on other sites More sharing options...
Enbo Posted February 8, 2015 Share Posted February 8, 2015 Yes, check for your character in scripts/prefabs, and replace your max health with this: inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH * .0001 ) 0001 is the (sort-of armor) multiplier of your character's health, which is compared to wilson's max health in tuning.lua 001 means 10% damage resistance, 0001 means 100% damage resistance. 20% damage resistance is 002, 30% is 003, I think you got it. Also, after the health component, write this: inst.components.combat:SetAttackPeriod(10) It modifies the way combat.lua reacts with your health, which also helps this line develop: inst.components.health:SetAbsorptionAmount(TUNING.WATHGRITHR_ABSORPTION*-10) Wigfrid has a damage modifier, that changes damage effectiveness when it interacts with player. But attention, alone it only affects tuning.lua, that being said environmental and passive damage still affect you pretty hard. Hope I helped. I am just messing around with you. I just hate when something makes the game easier than it already is. Link to comment Share on other sites More sharing options...
Mobbstar Posted February 8, 2015 Share Posted February 8, 2015 Check the API documentation in my signature Link to comment Share on other sites More sharing options...
Naidingo Posted February 8, 2015 Author Share Posted February 8, 2015 When I replace the maxhealth line with inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH* .0001) and log into the game my health is set at 1. I tried changing the Wilson part to my characters name but it just crashed. I don't know how to keep his normal health level and still have the damage absorption. Link to comment Share on other sites More sharing options...
Mobbstar Posted February 8, 2015 Share Posted February 8, 2015 The API docs Just set inst.components.health.absorb to something like so: inst.components.health.absorb = 20 The max health thing has nothing to do with damage reduction, how did you come up with that nonsense... Link to comment Share on other sites More sharing options...
Naidingo Posted February 8, 2015 Author Share Posted February 8, 2015 Thank you, that worked! 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.