Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 927 Bytes

entities.md

File metadata and controls

39 lines (32 loc) · 927 Bytes

Entities

Low level abstract entities may be created from other scripts. If you're looking for higher level entities, then it might be best to use Decorations.

Exports

Registering

Entities can be registered using the Register export.

Navigation

An entity can be created that holds a navigation register within it. When the player enters the radius, the navigation option will be added, and removed when they leave it.

exports.entities:Register({
	id = "entity-1",
	name = "Entity 1",
	coords = coords,
	radius = radius,
	navigation = navigation,
})

Creating a simple object attached to the entity is also possible.

exports.entities:Register({
	id = "entity-1",
	name = "Entity 1",
	coords = coords,
	rotation = rotation,
	model = model,
})

Other options.

  • floor: when set to true, the coordinates will snap to the ground.

Destroying

exports.entities:Destroy(id)