Quantcast
Channel: Super Mario Bros. X Forums
Viewing all articles
Browse latest Browse all 2874

LunaLua • effectReplacer.lua - replace 1.3 and block effects!

$
0
0
Allows you to replace any 1.3 effect with any other effect, including custom ones. Also allows you to set a custom effect to spawn when a block is destroyed, instead of the default one.

Image

Examples: show
Replacing an existing effect with a custom one:

Code:

local effectReplacer = require("effectReplacer")-- Replace the Goomba death effect (ID 4) with a custom effect (ID 751)effectReplacer.registerID(4, 751)-- Setting the replacement effect ID to 0 will result in the original effect simply being removedeffectReplacer.registerID(4, 0)-- Alternatively, you can also provide a function that runs whenever the effect is replacedeffectReplacer.registerID(4, 751, function(oldEffect, newEffect)    newEffect.speedY = oldEffect.speedYend)
Setting up an effect for a block being destroyed:

Code:

local effectReplacer = require("effectReplacer")-- Replace the destroy effect of the SMW cement block (ID 115) with effect ID 751effectReplacer.registerBlockDestroyEffect(115, 751)-- Setting the destroy effect ID to 0 will result in no effects spawning from the blockeffectReplacer.registerBlockDestroyEffect(115, 0)-- Alternatively, you can also provide a function that runs whenever the block is destroyedeffectReplacer.registerBlockDestroyEffect(115, 751, function(block, effect)    effect.speedY = block.speedYend)

Download

Statistics: Posted by MrDoubleA — Sat Mar 29, 2025 1:45 pm



Viewing all articles
Browse latest Browse all 2874

Trending Articles