设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2525|回复: 3
打印 上一主题 下一主题

[已经过期] 请问如何实现移动触发公共事件(附上自己写的失败插件)

[复制链接]

Lv2.观梦者

梦石
0
星屑
470
在线时间
271 小时
注册时间
2011-10-17
帖子
99
跳转到指定楼层
1
发表于 2017-6-30 14:18:32 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
功能很简单,每移动一步,执行一下公共事件

个人想法是利用增加步数(Game_Player.prototype.increaseSteps)来修改

结果自己写的插件经测试完全没有反应,请大神指教

另外话说论坛怎么发代码的格式?


//=============================================================================
// MoveEvent
//
// Last Update: 2017.6.30
//=============================================================================

/*:
* @plugindesc Allows move trigger CommonEvent
* @author
*
* @param Common Event ID
* @default 12
*
* @help This plugin does not provide plugin commands.
*
*/

(function() {

  var CommonEventId = parseInt(parameters['Common Event ID'] || 12);


//增加步数
Game_Player.prototype.increaseSteps = function() {
    //游戏人物 增加步数 呼叫(this , x , y)
    Game_Character.prototype.increaseSteps.call(this);
    //如果( 是普通() )
    if (this.isNormal()) {
        //游戏队伍 增加步数()
        $gameParty.increaseSteps();
        $gameTemp.reserveCommonEvent(CommonEventId);//此处为我添加的内容
    }

};

})();
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-6 16:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表