Jump to content

Recommended Posts

Im trying to make an item (on body slot) that give the player the ability to freeze the target while attacking (with every weapon) but the freezing status apply before the damage so the enemy instantly unfreeze

how can i apply it after the damage? i was listening on the "onattackother" event

ok this should work

inst.combatfreezing = function(attacker, data)
        if data.target and data.target.components.freezable then
            data.target.components.freezable:AddColdness(0.67)
            inst.components.fueled:DoDelta(-0.02 * inst.components.fueled.maxfuel)
            data.target.components.freezable:SpawnShatterFX()
        end
    end

    inst:ListenForEvent("onhitother", inst.combatfreezing, owner)

 

  • Sanity 1

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...