Jump to content

Recommended Posts

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)

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...