Franke004 Posted June 29, 2018 Share Posted June 29, 2018 Can i make an item damage the character when he attacks ? Link to comment https://forums.kleientertainment.com/forums/topic/92834-can-you-make-an-item-damage-you-when-you-use-it/ Share on other sites More sharing options...
K1NGT1GER609 Posted June 30, 2018 Share Posted June 30, 2018 Yes is the short answer. local function onattack_penalty(inst, owner, target) owner.components.health:DoDelta(-2) end local function fn(colour)--the main of the weapon if not TheWorld.ismastersim then --reference on where the next part of code goes return inst end inst.components.weapon:SetOnAttack(onattack_penalty) Link to comment https://forums.kleientertainment.com/forums/topic/92834-can-you-make-an-item-damage-you-when-you-use-it/#findComment-1057679 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