nanos world API Reference Unofficial documentation
Constructor Shared

Melee.Default Constructor

Syntax

Lua
Melee(location, rotation, asset, collision_type = CollisionType.Auto, gravity_enabled = true, handling_mode = HandlingMode.Torch, crosshair_material = "", can_use = true, spawn_mode = SpawnMode.Immediate)

Parameters

Name Type Default Description
location Vector
rotation Rotator
asset StaticMeshPath
collision_type optional CollisionType CollisionType.Auto
gravity_enabled optional boolean true
handling_mode optional HandlingMode HandlingMode.Torch
crosshair_material optional MaterialPath ""
can_use optional boolean true
spawn_mode optional SpawnMode SpawnMode.Immediate Pass <code>SpawnMode.AfterConstructor</code> or <code>SpawnMode.Manual</code> to avoid immediately sending the entity to clients and improve performance when you want to configure it by setting several configs. Must call <code>FinishSpawn()</code> after all