Scripting API
Scripting API
WorldTrails
Struct in Abyss.Core, from Abyss.Core.
Trails, as a game drives them from its code: an entity's Trail turned on and off, what it has left cleared, points added to it, and read.
public readonly struct WorldTrailsRemarks
A Trail leaves points as its entity moves: one each time it has gone Minimum Vertex Distance from the last, each lasting Time seconds, where the entity was in the world. Its ribbon runs from the entity through them, the newest first.
In the editor, every Trail is begun again, empty, as play starts and as it stops, and is held while the game is paused.
Constructors
WorldTrails
public WorldTrails(World world)Trails, as a game drives them from its code: an entity's Trail turned on and off, what it has left cleared, points added to it, and read.
Parameters
world: The world they are in.
A Trail leaves points as its entity moves: one each time it has gone Minimum Vertex Distance from the last, each lasting Time seconds, where the entity was in the world. Its ribbon runs from the entity through them, the newest first.
In the editor, every Trail is begun again, empty, as play starts and as it stops, and is held while the game is paused.
Methods
IsEmitting
public bool IsEmitting(ulong entity)Whether the Trail on an entity leaves points as it moves; false for an entity with none.
Parameters
entity
Exceptions
AbyssException: The id packs no entity.
SetEmitting
public void SetEmitting(ulong entity, bool emitting)Has the Trail on an entity leave points as it moves, or stop: stopped, its ribbon lets go of the entity and fades as its points go. Nothing for an entity with none.
Parameters
entityemitting
Exceptions
AbyssException: The id packs no entity.
Clear
public void Clear(ulong entity)Lets go of every point the Trail on an entity has left, so its ribbon begins again from where the entity is: what a teleport or a respawn wants, which would otherwise draw a ribbon across.
Parameters
entity
Exceptions
AbyssException: The id packs no entity, or the world has no Trails.
AddPoint
public void AddPoint(ulong entity, Vector3 position)Has the Trail on an entity leave a point at position, in the world, now: its newest, lasting as each it leaves does.
Parameters
entityposition
Exceptions
AbyssException: The id packs no entity, or the world has no Trails.
Points
public int Points(ulong entity, Span<Vector3> into)Reads the points the Trail on an entity has left into into, the oldest first, in the world, as many as it holds: how many there are, which may be more.
Parameters
entityinto
Exceptions
AbyssException: The id packs no entity.
Points
public Vector3[] Points(ulong entity)The points the Trail on an entity has left, the oldest first, in the world; none for one that has left none.
Parameters
entity
Exceptions
AbyssException: The id packs no entity.
