User Tools

Site Tools


4rpl:commands:createtrail

Index

CreateTrail

CreateTrail(<-Unit “ObjName” <-trailType <-trailLifetime)

Description

Attaches a trail to an object. Objects are the sub-parts that make up a unit. A trail is a visual effect that follows the motions of an object and fades out over time. It is useful for things like missiles or ammo shots.
The trail type is an int that specifes the type. A type of 0 means the trail is a line (like a mortar shot). A type of 1 means the trail is a smoke trail (like missile exhaust).
The lifetime controls how long the trail persists, in seconds, before fading out. The mortar shot uses a 2 second fade, and the missiles use a 0.7 second fade. Take care to not use long duration trails when there are many trails. Calling create trail on an object when there is already a trail, has no effect.
Note, use “” (empty string) to indicate the root level object.

:WARNING: There is a limit of particles for smoke trails. If this limit is reached, no additional smoke will be created by the trail. This limit is very easy to reach so be sure to keep smoke trail life time relatively low.

Examples

CreateTrail(self "Trail0" 0 2)

Index

4rpl/commands/createtrail.txt · Last modified: 2024/02/18 15:46 by Vertu