sm.melee

Information about melee attacks are located in `/Data/Melee/attacks.json`.

Functions:

  • getMeleeAttackHits
  • meleeAttack
  • meleeAttack
  • meleeAttack
  • meleeAttack

  • sm.melee.getMeleeAttackHits(uuid, origin, directionRange, source)

    Performs melee attack check and returns a table of raycast results.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the melee attack.
    Vec3originThe source position of the attack.
    Vec3directionRangeThe direction and reach of the attack.
    UnitsourceThe unit that is the source of the attack.

    Returns:

    TypeDescription
    tableRaycastResult A table containing RaycastResult data.

    sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)

    Deprecated:

    Name is deprecated, use uuid instead

    Perform a melee attack

    Parameters:

    TypeNameDescription
    stringnameThe name of the melee attack.
    integerdamageThe damage the attack will inflict.
    Vec3originThe source position of the attack.
    Vec3directionRangeThe direction and reach of the attack.
    PlayersourceThe player that is the source of the attack.
    integerdelay?The number of ticks before performing the attack. (Defaults to 0)
    numberpower?The strength of the knockback power. (Defaults to 5000)
    tableignoreCharactersA table of characters to ignore in the attack. (optional)

    sm.melee.meleeAttack(name, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)

    Deprecated:

    Name is deprecated, use uuid instead

    Perform a melee attack

    Parameters:

    TypeNameDescription
    stringnameThe name of the melee attack.
    integerdamageThe damage the attack will inflict.
    Vec3originThe source position of the attack.
    Vec3directionRangeThe direction and reach of the attack.
    UnitsourceThe unit that is the source of the attack.
    integerdelay?The number of ticks before performing the attack. (Defaults to 0)
    numberpower?The strength of the knockback power. (Defaults to 5000)
    tableignoreCharactersA table of characters to ignore in the attack. (optional)

    sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)

    Perform a melee attack

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the melee attack.
    integerdamageThe damage the attack will inflict.
    Vec3originThe source position of the attack.
    Vec3directionRangeThe direction and reach of the attack.
    PlayersourceThe player that is the source of the attack.
    integerdelay?The number of ticks before performing the attack. (Defaults to 0)
    numberpower?The strength of the knockback power. (Defaults to 5000)
    tableignoreCharactersA table of characters to ignore in the attack. (optional)

    sm.melee.meleeAttack(uuid, damage, origin, directionRange, source, delay?, power?, ignoreCharacters)

    Perform a melee attack

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the melee attack.
    integerdamageThe damage the attack will inflict.
    Vec3originThe source position of the attack.
    Vec3directionRangeThe direction and reach of the attack.
    UnitsourceThe unit that is the source of the attack.
    integerdelay?The number of ticks before performing the attack. (Defaults to 0)
    numberpower?The strength of the knockback power. (Defaults to 5000)
    tableignoreCharactersA table of characters to ignore in the attack. (optional)