Skip to content

Lua Additions

Difficult_Bit2901 edited this page Mar 9, 2023 · 1 revision

Shaders

A few shaders have been hard-coded into the game and can be applied to different things.

Removing shaders

clearCameraShaders(camera:String)

This will remove all shaders applied to camera.

Adding shaders

All functions will add a shader to the specified obj (which can also be a camera) with all following parameters as customization.

addChromaticShader(obj:String, offset:Float=0.0)

addScanlineShader(obj:String)

addTiltshiftShader(obj:String, blurAmount:Float, center:Float)

addMonochromeShader(obj:String)

addGrainShader(obj:String, grainsize:Float, lumamount:Float)

addVCRShader(obj:String, glitchFactor:Float, distortion:Bool = true, perspectiveOn:Bool = true, vignetteMoving:Bool = true)

add3DShader(obj:String,xrotation:Float = 0, yrotation:Float = 0, zrotation:Float = 0, depth:Float = 0)

addBloomShader(obj:String,blurSize:Float = 0, intensity:Float = 0)

addGlitchShader(obj:String,speed:Float = 0, frequency:Float = 0, amplitude:Float = 0)

addDistortionShader(obj:String,speed:Float = 0, frequency:Float = 0, amplitude:Float = 0)

addPulseShader(obj:String,speed:Float = 0, frequency:Float = 0, amplitude:Float = 0)

addInversionShader(obj:String, lockAlpha:Bool = true)

addSolidColorShader(obj:String, colorString:String)

Backdrops

Backdrops are infinitely repeating background images.

addLuaBackdrop(tag:String, image:String, scrollX:Float = 1, scrollY:Float = 1, repeatX:Bool = true, repeatY:Bool = true, spaceX:Int = 0, spaceY:Int = 0)

Creates a backdrop with:

  • tag as it's identifying tag
  • image as it's image
  • scrollX determining how much it should move with the camera
  • scrollY determining how much it should move with the camera
  • reapeatX determining if it should repeat on the x axis
  • repeatY determining if it should repeat on the y axis
  • spaceX as the distance between repeats on the x axis
  • spaceY as the distance between repeats on the y axis

changeBackdropSpeed(tag:String, speedX:Float = 1, speedY:Float = 1)

Changes the speed the backdrop with the tag tag moves with.

addLuaBackdrop(tag:String, front:Bool = false)

Adds the backdrop with tag tag to the game. If front is true it will in front of the characters, otherwise behind them.

removeLuaBackdrop(tag:String, destroy:Bool = true)

Removes the backdrop with tag tag from the game. If destroy is false it will be re-addable.

luaBackdropExists(tag:String)

Tells you if a backdrop with tag tag exists.

Variables

opponentPlay

This will be true or false, depending on whether opponent mode is active or not)

Clone this wiki locally