NPCData
Description
Information about the NPC data structure, used to define spawnable NPCs for the Sandbox gamemode.
Example usage:
Members
table Weapons
A list of weapons this NPC is typically meant to use. One will be picked on spawn at random, unless overwritten by the player.
Default: {}
number SpawnFlags
Additional spawnflags for this NPC. See Entity:GetSpawnFlags.
Ignored if TotalSpawnFlags
key is present.
Default: 0
boolean OnCeiling
If set to
true
, this NPC can only be spawned on the ceiling. Stacks with OnFloor
.Default: false
boolean OnFloor
If set to
true
, this NPC can only be spawned on the floor. Stacks with OnCeiling
.Default: false
number Offset
Offset, in Hammer units, away from the surface where the player is looking at for the NPC spawn position.
Default: 0
Angle Rotate
Used to add additional rotation the NPC post spawn. Usually all NPCs would be facing the player on spawn. Value of
Angle( 0, 180, 0 )
would make the NPC face away from the player.Default: Angle( 0, 0, 0 )
function OnDuplicated
If set, a function to be called when the NPC is pasted using the duplicator library.
Default: nil