autotileWaterSpeed v1.0
willow
Introduction
Have you ever wanted to change the speed of the water or waterfalls from the autotile A1 set? Now you can! Make the water faster or slower for dramatic moments or whatever. Yay!
Features
Set how often the water tiles are cycled, in frames.
Set it once with the plugin, or update it in game via an event!
How to Use
Paste the code it into a file that you save as autotileWaterSpeed.js in the project's /js/plugins folder.
Plugin Commands / Script Calls
Command "set" lets you update how many frames between water tile updates.
Screenshots
Download
itch.io
Spoiler: autotileWaterSpeed.js
Code: //============================================================================== // autotileWaterSpeed.js //============================================================================== var Imported = Imported || {}; Imported.autotileWaterSpeed = true; var autotileWaterSpeed = {}; /*: * @plugindesc Adjusts the speed of the animated water autotiles. * @target MZ * @author willow * @url https://forums.rpgmakerweb.com/threads/autotile-water-speed-animation-adjustment.183752/ * * @param speed * @text Water update speed * @desc Frames between water tile updates. 60 frames = 1 second * @default 10 * @min 1 * * * @command set * @text Set Water Speed * @desc Adjust the water animation from an event. * * @arg speed * @type number * @min 1 * @default 10 * @text Water update speed * @desc Frames between water tile updates. 60 frames = 1 second * * * * * @help * ---------------------------------------------------------------------------- * autotile water speed v1.0 by willow * released into the public domain / free for any usage * ---------------------------------------------------------------------------- * * Plugin command "set" lets you adjust this from an event! :) */ (() => { autotileWaterSpeed.Parameters = PluginManager.parameters('autotileWaterSpeed'); autotileWaterSpeed.speed = Number(autotileWaterSpeed.Parameters['speed']); PluginManager.registerCommand('autotileWaterSpeed', "set", args => { autotileWaterSpeed.speed = args.speed; }); Tilemap.prototype.update = function() { this.animationCount++; this.animationFrame = Math.floor(this.animationCount / autotileWaterSpeed.speed); for (const child of this.children) { if (child.update) { child.update(); } } }; })(); 复制代码
Terms and Credits
public domain, you can use it for whatever, no need to credit
本贴来自国际rpgmaker官方论坛作者:weepingwitch处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/autotile-water-speed-animation-adjustment.183752/