Visual Effects Documentation
Vfx Methods
b8.Vfx.draw(animation, startTime [,offsetCol] [,offsetRow])
Draw Vfx at the current cursor position.
Parameters
- animation (string): The animation to draw.
- startTime (number): The start time of the animation. If null, uses the core start time. If startTime is in the future, the animation will delayed until startTime.
- [offsetCol] (number): The x offset to apply to the drawing position. (default: 0)
- [offsetRow] (number): The y offset to apply to the drawing position. (default: 0)
b8.Vfx.drawOutline(animation, startTime [,offsetCol] [,offsetRow])
Draw Vfx outline at the current cursor position. The outline uses the current background color for the border. The Vfx will have a transparent background with the border in the background colour.
Parameters
- animation (string): The animation to draw.
- startTime (number): The start time of the animation. If null, uses the core start time. If startTime is in the future, the animation will delayed until startTime.
- [offsetCol] (number): The x offset to apply to the drawing position. (default: 0)
- [offsetRow] (number): The y offset to apply to the drawing position. (default: 0)
b8.Vfx.get(animation)
Get Vfx animation by id.
Parameters
- animation (string): The animation id.
Returns
- (Object|undefined): The Vfx animation object, or undefined if not found.
b8.Vfx.shouldLoop(animation, startTime)
Checks if the Vfx animation has finished looping.
Parameters
- animation (string|Object): The animation to check.
- startTime (number): The start time of the animation.
Returns
- (boolean): Returns true if the animation should continue, false if it has finished looping.
b8.Vfx.spr(animation, startTime, x, y)
Draw Vfx at a specific x, y position.
Parameters
- animation (string): The animation to draw.
- startTime (number|null): The start time of the animation. If null, uses the core start time. If startTime is in the future, the animation will delayed until startTime.
- x (number): The x position to draw the Vfx.
- y (number): The y position to draw the Vfx.
Returns
- (boolean): Returns true if the animation is still playing, false if it has finished.
b8.Vfx.sprOutline(animation, startTime, x, y)
Draw Vfx at a specific x, y position with an outline. The outline uses the current background color for the border. The Vfx will have a transparent background with the border in the background colour.
Parameters
- animation (string): The animation to draw.
- startTime (number|null): The start time of the animation. If null, uses the core start time. If startTime is in the future, the animation will delayed until startTime.
- x (number): The x position to draw the Vfx.
- y (number): The y position to draw the Vfx.
Returns
- (boolean): Returns true if the animation is still playing, false if it has finished.