SenL Posted February 20, 2015 Share Posted February 20, 2015 Is it possible to have a custom weapon (or change existing) to do more dmg to one certain enemy? Let's say... hambat. Does x dmg to all, but x+10 to pigman How? Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/51219-weapon-higher-dmg-to-one-prefab/ Share on other sites More sharing options...
DarkXero Posted February 20, 2015 Share Posted February 20, 2015 Well, there are many ways to do it.Example:local function ApplyExtraDamage(weapon, attacker, target) if target.prefab == "pigman" then target.components.health:DoDelta(-2000) endendAddPrefabPostInit("hambat", function(inst) inst.components.weapon:SetOnAttack(ApplyExtraDamage)end) Link to comment https://forums.kleientertainment.com/forums/topic/51219-weapon-higher-dmg-to-one-prefab/#findComment-614933 Share on other sites More sharing options...
SenL Posted February 20, 2015 Author Share Posted February 20, 2015 Wow I just can't think of stuff like that. Haha.Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/51219-weapon-higher-dmg-to-one-prefab/#findComment-614936 Share on other sites More sharing options...
DarkXero Posted February 20, 2015 Share Posted February 20, 2015 Yeah, it's just a matter of trying.A lot of the time I think of the most convoluted stuff because I take a non-optimal starting point. Link to comment https://forums.kleientertainment.com/forums/topic/51219-weapon-higher-dmg-to-one-prefab/#findComment-614938 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