如何让图片固定在地图的某个坐标上不随玩家移动
//============================================================================= // TTK - Fix Picture (v1.0.0) // by Fogomax //============================================================================= /*: * @author Fogomax * @plugindesc This plugin fixes the images in the map * <TTK FixPicture> * @help =========================================================================== ● Explanation =========================================================================== This plugins fixes the image in the map and in the coordenates specifieds in the event command, its not necessary the position be 0, 0. Because of this feature, you still can use the Move Picture command with fixed pictures. =========================================================================== ● Use =========================================================================== Just include the prefix in the image file name. Using the default Fix Prefix, the image name would be "[FIX]Image.png". @param Fix Prefix @desc The prefix the image needs have to be fixed @default [FIX] */ var Imported = Imported || {}; Imported["TTK_FixPicture"] = "1.0.0"; var TTK = TTK || {}; TTK.FixPicture = {}; "use strict"; (function($) { $.Params = $plugins.filter(function(p) { return p.description.contains('<TTK FixPicture>'); })[0].parameters; //----------------------------------------------------------------------------- // Plugin global variables // $.fixPrefix = $.Params["Fix Prefix"]; //----------------------------------------------------------------------------- // Sprite_Picture // var _Sprite_Picture_updatePosition = Sprite_Picture.prototype.updatePosition; Sprite_Picture.prototype.updatePosition = function() { if (~this.picture().name().indexOf($.fixPrefix)) { var picture = this.picture(); this.x = (-$gameMap.displayX() * 48) + picture.x(); this.y = (-$gameMap.displayY() * 48) + picture.y(); } else { _Sprite_Picture_updatePosition.call(this); } }; })(TTK.FixPicture);
让图片跟随 玩家移动 的脚本语句在哪
yuna8922842 发表于 2024-1-15 15:19
请问这些语句怎么用啊?
yuna8922842 发表于 2024-1-15 16:22
试了不行呀,哪里没弄对吗。。。
shiroin 发表于 2024-1-15 17:02
我测试过插件可行,你是不是针对图片的XY轴设置没调好导致没看见?
this.x = (-$gameMap.displayX() * ...
yuna8922842 发表于 2024-1-15 20:49
我测试了地图是60*40,在文件夹pictures下放置了 [FIX]风车叶.png 图片,我做了个事件,
执行内容:显示 ...
898 Bytes, 下载次数: 5
shiroin 发表于 2024-1-15 21:11
我把我的发给你,我是自己有测试过效果的,不需要再编辑什么,即插即用 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |