Progetto H — API Reference API & Scripting Documentation
Constructor Shared

Character.Default Constructor

Syntax

Lua
Character(location, rotation, skeletal_mesh_asset, collision_type = CollisionType.Auto, gravity_enabled = true, max_health = 100, death_sound = nanos-world::A_Male_01_Death, pain_sound = nanos-world::A_Male_01_Pain, spawn_mode = SpawnMode.Immediate)

Parameters

Name Type Default Description
location Vector
rotation Rotator
skeletal_mesh_asset SkeletalMeshPath
collision_type optional CollisionType CollisionType.Auto
gravity_enabled optional boolean true
max_health optional integer 100 Current / Max Health
death_sound optional SoundPath nanos-world::A_Male_01_Death Played when Character dies
pain_sound optional SoundPath nanos-world::A_Male_01_Pain Played when Character takes damage
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