🔪 Melee
A Melee represents an Entity which can be Pickable by a Character and can be used to melee attack, Charactes can hold it with hands with pre-defined handling modes.
💂Authority
This class can only be spawned on 🟦 Server side.
👪Inheritance
🧑💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
🎒 Examples
local crowbar = Melee(
Vector(-900, 185, 215),
Rotator(0, 90, 90),
"nanos-world::SM_Crowbar_01",
CollisionType.Normal,
true,
HandlingMode.SingleHandedMelee,
""
)
crowbar:SetScale(Vector(1.5, 1.5, 1.5))
crowbar:AddAnimationCharacterUse("nanos-world::AM_Mannequin_Melee_Slash_Attack")
crowbar:SetDamageSettings(0.3, 0.5)
crowbar:SetCooldown(1.0)
crowbar:SetBaseDamage(40)
🛠 Constructors
Default Constructor
local my_melee = Melee(location, rotation, asset, collision_type?, gravity_enabled?, handling_mode?, crosshair_material?, can_use?)
Type | Name | Default | Description |
---|---|---|---|
Vector | location | Required parameter | No description provided |
Rotator | rotation | Required parameter | No description provided |
StaticMesh Reference | asset | Required parameter | No description provided |
CollisionType | collision_type | CollisionType.Auto | No description provided |
boolean | gravity_enabled | true | No description provided |
HandlingMode | handling_mode | HandlingMode.Torch | No description provided |
Material Reference | crosshair_material |
| No description provided |
boolean | can_use | true | No description provided |
tip
nanos world provides a special Particle* called nanos-world::P_Grenade_Special
which spawns different particles depending on the surface it explodes, and also if is underwater.
*This "Particle" is just a special identifier which can only be used on Grenades!