addTrailMemberAdvanced

open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, additive: Boolean, textureLoopLength: Float, textureScrollSpeed: Float, textureOffset: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>, layerToRenderOn: CombatEngineLayers, frameOffsetMult: Float)

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

additive

Whether this trail will use additive blending or not. Does not support being changed in the middle of a trail

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

textureOffset

Optional texture offset to prevent repetitions between trails, default:0, fixed random offset: -1;

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail

layerToRenderOn

Which combat layer to render the trail on. All available layers are specified in CombatEngineLayers. Old behaviour was CombatEngineLayers.BELOW_INDICATORS_LAYER. CANNOT change mid-trail, under any circumstance

frameOffsetMult

The per-frame multiplier for the per-frame velocity offset magnitude. Used to finely adjust trail offset at different speeds. Default: 1f


open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, blendModeSRC: Int, blendModeDEST: Int, textureLoopLength: Float, textureScrollSpeed: Float, textureOffset: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>, layerToRenderOn: CombatEngineLayers, frameOffsetMult: Float)

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

blendModeSRC

Which SRD openGL blend mode to use for the trail. If you are unsure of what this means, just put it as GL_SRC_ALPHA

blendModeDEST

Which DEST openGL blend mode to use for the trail. If you are unsure of what this means, put it as GL_ONE_MINUS_SRC_ALPHA for normal blending and GL_ONE for additive blending

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

textureOffset

Optional texture offset to prevent repetitions between trails, default:0, fixed random offset: -1;

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail

layerToRenderOn

Which combat layer to render the trail on. All available layers are specified in CombatEngineLayers. Old behaviour was CombatEngineLayers.BELOW_INDICATORS_LAYER. CANNOT change mid-trail, under any circumstance

frameOffsetMult

The per-frame multiplier for the per-frame velocity offset magnitude. Used to finely adjust trail offset at different speeds. Default: 1f


open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, additive: Boolean, textureLoopLength: Float, textureScrollSpeed: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>, layerToRenderOn: CombatEngineLayers, frameOffsetMult: Float)

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

additive

Whether this trail will use additive blending or not. Does not support being changed in the middle of a trail

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail

layerToRenderOn

Which combat layer to render the trail on. All available layers are specified in CombatEngineLayers. Old behaviour was CombatEngineLayers.BELOW_INDICATORS_LAYER. CANNOT change mid-trail, under any circumstance

frameOffsetMult

The per-frame multiplier for the per-frame velocity offset magnitude. Used to finely adjust trail offset at different speeds. Default: 1f


open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, blendModeSRC: Int, blendModeDEST: Int, textureLoopLength: Float, textureScrollSpeed: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>, layerToRenderOn: CombatEngineLayers, frameOffsetMult: Float)

Deprecated

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

blendModeSRC

Which SRD openGL blend mode to use for the trail. If you are unsure of what this means, just put it as GL_SRC_ALPHA

blendModeDEST

Which DEST openGL blend mode to use for the trail. If you are unsure of what this means, put it as GL_ONE_MINUS_SRC_ALPHA for normal blending and GL_ONE for additive blending

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail

layerToRenderOn

Which combat layer to render the trail on. All available layers are specified in CombatEngineLayers. Old behaviour was CombatEngineLayers.BELOW_INDICATORS_LAYER. CANNOT change mid-trail, under any circumstance

frameOffsetMult

The per-frame multiplier for the per-frame velocity offset magnitude. Used to finely adjust trail offset at different speeds. Default: 1f


open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, blendModeSRC: Int, blendModeDEST: Int, textureLoopLength: Float, textureScrollSpeed: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>)

Deprecated

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

blendModeSRC

Which SRD openGL blend mode to use for the trail. If you are unsure of what this means, just put it as GL_SRC_ALPHA

blendModeDEST

Which DEST openGL blend mode to use for the trail. If you are unsure of what this means, put it as GL_ONE_MINUS_SRC_ALPHA for normal blending and GL_ONE for additive blending

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail


open fun addTrailMemberAdvanced(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, startSpeed: Float, endSpeed: Float, angle: Float, startAngularVelocity: Float, endAngularVelocity: Float, startSize: Float, endSize: Float, startColor: Color, endColor: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, blendModeSRC: Int, blendModeDEST: Int, textureLoopLength: Float, textureScrollSpeed: Float, offsetVelocity: Vector2f, advancedOptions: Map<String, Any>, layerToRenderOn: CombatEngineLayers)

Deprecated

Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail. This function has all available functions; if you just want to spawn a normal trail without all the extra configuration involved, use AddTrailMemberSimple instead.

Parameters

linkedEntity

The entity this trail is attached to, used for cutting trails. Can be Null, but that should really only be done in weird, edge-case scenarios

ID

The ID for this specific trail. Preferably get this from getUniqueID, but it's not required: just expect very weird results if you don't

sprite

Which sprite to draw for this trail: do *not* change this halfway through a trail, as that will split it into two trails

position

Starting position for this piece of trail

startSpeed

The starting speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

endSpeed

The ending speed, in SU, this trail piece is moving at. The trail piece smoothly transitions from its startSpeed to its endSpeed over its duration

angle

Which angle this piece of trail has in degrees; determines which direction it moves, and which direction its size is measured over

startAngularVelocity

The angular velocity this trail piece has when spawned. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

endAngularVelocity

The angular velocity this trail piece has just before disappearing. The angular velocity of a trail piece smoothly transitions from startAngularVelocity to endAngularVelocity over its duration

startSize

The starting size (or rather width) this piece of trail has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

endSize

The ending size (or rather width) this trail piece has. Measured in SU. A trail smoothly transitions from its startSize to its endSize over its duration

startColor

The color this piece of trail has when spawned. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

endColor

The color this piece of trail has just before disappearing. Can be changed in the middle of a trail, and will blend smoothly between pieces. Ignores alpha component entirely. Each trail piece smoothly transitions from startColor to endColor over its duration

opacity

The starting opacity of this piece of trail. Is a value between 0f and 1f. The opacity gradually approaches 0f over the trail's duration

inDuration

How long this trail spends "fading in"; for this many seconds, the opacity of the trail piece steadily increases until reaching "opacity". A trail's total duration is inDuration + mainDuration + outDuration

mainDuration

How long a trail uses its maximum opacity. A trail's total duration is inDuration + mainDuration + outDuration

outDuration

How long a trail spends "fading out"; over this many seconds at the end of the trail's duration, its opacity goes from "opacity" to 0f. A trail's total duration is inDuration + mainDuration + outDuration

blendModeSRC

Which SRD openGL blend mode to use for the trail. If you are unsure of what this means, just put it as GL_SRC_ALPHA

blendModeDEST

Which DEST openGL blend mode to use for the trail. If you are unsure of what this means, put it as GL_ONE_MINUS_SRC_ALPHA for normal blending and GL_ONE for additive blending

textureLoopLength

How many SU it takes for the texture to loop. Should preferably be non-zero. If the trail is not supposed to loop, put this as -1f

textureScrollSpeed

How fast, and in which direction, the texture scrolls over the trail. Defined so that 1000 means scrolling the entire texture length once per second, and 2000 means scrolling the entire texture length twice per second

offsetVelocity

The offset velocity of the trail; this is an additional velocity that is unaffected by rotation and facing, and will never change over the trail's lifetime

advancedOptions

The most unique and special options go in a special Map<> here. Be careful to input the correct type values and use the right data keys. Any new features will be added here to keep compatibility with old mod versions. Can be null. Currently supported keys: "SIZE_PULSE_WIDTH" : Float - How much additional width the trail gains each "pulse", at most. Used in conjunction with SIZE_PULSE_COUNT "SIZE_PULSE_COUNT" : Integer - How many times the trail "pulses" its width over its lifetime. Used in conjunction with SIZE_PULSE_WIDTH "FORWARD_PROPAGATION" : Boolean - If the trail uses the legacy render method of "forward propagation". Used to be the default. CANNOT be changed mid-trail

layerToRenderOn

Which combat layer to render the trail on. All available layers are specified in CombatEngineLayers. Old behaviour was CombatEngineLayers.BELOW_INDICATORS_LAYER. CANNOT change mid-trail, under any circumstance