Magic Trail Plugin
Allows custom QUAD_STRIP-style trails to be drawn freely, with a bunch of customization available. Note that any sprites that use this plugin must have a multiple of 2 as size (so 16, 32, 64, 128 etc.), both in width and height. The trails are made by spawning "trail pieces", which if they have the same ID links together to form a smooth trail (the trail will not render without having at least 2 pieces link together).
Author
Nicke535, Originem (optimization)
Functions
Link copied to clipboard
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>)
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)
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)
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)
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)
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.
Link copied to clipboard
open fun addTrailMemberAnimated(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>)
open fun addTrailMemberAnimated(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)
open fun addTrailMemberAnimated(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)
open fun addTrailMemberAnimated(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)
open fun addTrailMemberAnimated(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)
open fun addTrailMemberAnimated(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.
Link copied to clipboard
open fun addTrailMemberSimple(linkedEntity: CombatEntityAPI, ID: Float, sprite: SpriteAPI, position: Vector2f, speed: Float, angle: Float, startSize: Float, endSize: Float, color: Color, opacity: Float, inDuration: Float, mainDuration: Float, outDuration: Float, additive: Boolean)
Spawns a trail piece, which links up with other pieces with the same ID to form a smooth trail.
Link copied to clipboard
"Cuts" all trails on a designated entity, forcing new trail pieces to not link up with old ones.
Link copied to clipboard
Link copied to clipboard
A small function to get a unique ID for the trail member: *must* be saved in the function that generates the trail, since if it changes it counts as a new trail altogether