yoyster54 Posted May 10, 2022 Share Posted May 10, 2022 Hello! I'm fresh into the DST modding scene and have been working on adding custom perks to my character. He just so happens to hate rabbits, and anything rabbit-like. So I've been searching for a way for him to specifically do double damage to the only the entities under the 'rabbit', 'manrabbit', and 'bunnyman' categories, but I haven't turned anything up. If anyone can offer some help, I'd greatly appreciate it. Thank you for reading. Link to comment https://forums.kleientertainment.com/forums/topic/140117-help-2x-damage-to-specific-mobs/ Share on other sites More sharing options...
-LukaS- Posted May 10, 2022 Share Posted May 10, 2022 There is a function in the combat component that you can use: inst.components.combat.bonusdamagefn = function(inst, target, damage, weapon) -- Bonus damage function if target:HasTag("rabbit") or target:HasTag("manrabbit") then -- Check if the target has the "rabbit" or the "manrabbit" tag return damage -- Return the damage end return 0 -- Return no additional damage end Put this in your characters file under "inst:AddComponent("combat")" Link to comment https://forums.kleientertainment.com/forums/topic/140117-help-2x-damage-to-specific-mobs/#findComment-1569017 Share on other sites More sharing options...
yoyster54 Posted May 10, 2022 Author Share Posted May 10, 2022 1 hour ago, -t- said: There is a function in the combat component that you can use: inst.components.combat.bonusdamagefn = function(inst, target, damage, weapon) -- Bonus damage function if target:HasTag("rabbit") or target:HasTag("manrabbit") then -- Check if the target has the "rabbit" or the "manrabbit" tag return damage -- Return the damage end return 0 -- Return no additional damage end Put this in your characters file under "inst:AddComponent("combat")" Looks like that did the trick! Thank you so much! Link to comment https://forums.kleientertainment.com/forums/topic/140117-help-2x-damage-to-specific-mobs/#findComment-1569062 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now