customblockanim.lua - Cause we got no block.txt at the moment
Posted: Sun Apr 21, 2019 8:27 am
This script lets you customize blocks kinda like you would customise NPCs, BGOs and effects in txt files. Definitely not basegame-worthy, but it should take care of wanting animating blocks of certain sizes.
Download:
https://pastebin.com/cDPxepWG
Example:
Docs (also in the file):
Download:
https://pastebin.com/cDPxepWG
Example:
Spoiler: show
Code: Select all
-- customblockanim.register is the only thing you can call in this library. It takes an ID and several optional arguments and will transform all blocks of the specified ID into what you set them to be. It will adjust width and height or all blocks of the ID to image.width and image.height/frames automatically.
customblockanim.register(id, {
frames = #, --default 4
framespeed = #, --default 8
opacity = #, --default 1
priority = #, --default -65
img = imageresource, --defaults to standard image of the block id, will make block automatically invisible if left unchanged
})