Progetto H — API Reference API & Scripting Documentation
Constructor Shared

Grenade.Default Constructor

Syntax

Lua
Grenade(location, rotation, static_mesh_asset = nanos-world::SM_Grenade_G67, explosion_particles = nanos-world::P_Grenade_Special, explosion_sound = nanos-world::A_Explosion_Large, collision_type = CollisionType.Auto, gravity_enabled = true, spawn_mode = SpawnMode.Immediate)

Parameters

Name Type Default Description
location Vector
rotation Rotator
static_mesh_asset optional StaticMeshPath nanos-world::SM_Grenade_G67
explosion_particles optional ParticlePath nanos-world::P_Grenade_Special
explosion_sound optional SoundPath nanos-world::A_Explosion_Large
collision_type optional CollisionType CollisionType.Auto
gravity_enabled 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