RPG制作大师VX的脚本问题_百度知道
RPG制作大师VX的脚本问题
要么没反应,要么错误。顺便给个商店脚本!!如何插入脚本,我插了几次都不成功
.我搞了个横版战斗的脚本,插进去后没用、情何以堪啊~!、没反应...这林我无言以对
我有更好的答案
把脚本编辑器拉到最底下
然后有一个
(插入于此)
右键点击 选插入 把脚本粘贴进去就行了
我搞了个横版战斗的脚本,插进去后没用、没反应.....这林我无言以对、情何以堪啊~!!!
你在哪里选的
这是网址这是图片
采纳率:14%
baidu.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><img class="ikqb_img" src="http://g.hiphotos打开脚本,在脚本列表里点右键【插入】把脚本复制进去<a href="http.com/zhidao/wh%3D600%2C800/sign=c83444ebcbbe062667ebe60/3bf33a87eb7d9625343fbf2b3118b82.jpg" esrc="http://g.hiphotos://g.hiphotos.baidu.com/zhidao/pic/item/3bf33a87eb7d9625343fbf2b3118b82.baidu
我搞了个横版战斗的脚本,插进去后没用、没反应.....这林我无言以对、情何以堪啊~!!!
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。rpg maker xp脚本错误
No Method Error Undefined method 'event' for nil:NilClass 没有方法错误 未定义的方法'事件'为零:NilClass 打开脚本编辑器,将Game_Player内内容全部删除,将以下脚本复制进去保存再试试 #============================================================================== # ■ Game_Player #------------------------------------------------------------------------------ #
处理主角的类。事件启动的判定、以及地图的滚动等功能。 # 本类的实例请参考 $game_player。 #============================================================================== class Game_Player & Game_Character #-------------------------------------------------------------------------- # ● 恒量 #-------------------------------------------------------------------------- CENTER_X = (320 - 16) * 4
# 画面中央的 X 坐标 * 4 CENTER_Y = (240 - 16) * 4
# 画面中央的 Y 坐标 * 4 #-------------------------------------------------------------------------- # ● 可以通行判定 #
x : X 坐标 #
y : Y 坐标 #
d : 方向 (0,2,4,6,8)
※ 0 = 全方向不能通行的情况判定 (跳跃用) #-------------------------------------------------------------------------- def passable?(x, y, d) # 求得新的坐标 new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) # 坐标在地图外的情况下 unless $game_map.valid?(new_x, new_y) # 不能通行 return false end # 调试模式为 ON 并且 按下 CTRL 键的情况下 if $DEBUG and Input.press?(Input::CTRL) # 可以通行 return true end super end #-------------------------------------------------------------------------- # ● 像通到画面中央一样的设置地图的显示位置 #-------------------------------------------------------------------------- def center(x, y) max_x = ($game_map.width - 20) * 128 max_y = ($game_map.height - 15) * 128 $game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max $game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max end #-------------------------------------------------------------------------- # ● 向指定的位置移动 #
x : X 座标 #
y : Y 座标 #-------------------------------------------------------------------------- def moveto(x, y) super # 自连接 center(x, y) # 生成遇敌计数 make_encounter_count end #-------------------------------------------------------------------------- # ● 增加步数 #-------------------------------------------------------------------------- def increase_steps super # 不是强制移动路线的场合 unless @move_route_forcing # 增加步数 $game_party.increase_steps # 步数是偶数的情况下 if $game_party.steps % 2 == 0 # 检查连续伤害 $game_party.check_map_slip_damage end end end #-------------------------------------------------------------------------- # ● 获取遇敌计数 #-------------------------------------------------------------------------- def encounter_count return @encounter_count end #-------------------------------------------------------------------------- # ● 生成遇敌计数 #-------------------------------------------------------------------------- def make_encounter_count # 两种颜色震动的图像 if $game_map.map_id != 0 n = $game_map.encounter_step @encounter_count = rand(n) + rand(n) + 1 end end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh # 同伴人数为 0 的情况下 if $game_party.actors.size == 0 # 清除角色的文件名及对像 @character_name = && @character_hue = 0 # 分支结束 return end # 获取带头的角色 actor = $game_party.actors[0] # 设置角色的文件名及对像 @character_name = actor.character_name @character_hue = actor.character_hue # 初始化不透明度和合成方式子 @opacity = 255 @blend_type = 0 end #-------------------------------------------------------------------------- # ● 同位置的事件启动判定 #-------------------------------------------------------------------------- def check_event_trigger_here(triggers) result = false # 事件执行中的情况下 if $game_system.map_interpreter.running? return result end # 全部事件的循环 for event in $game_map.events.values # 事件坐标与目标一致的情况下 if event.x == @x and event.y == @y and triggers.include?(event.trigger) # 跳跃中以外的情况下、启动判定是同位置的事件 if not event.jumping? and event.over_trigger? event.start result = true end end end return result end #-------------------------------------------------------------------------- # ● 正面事件的启动判定 #-------------------------------------------------------------------------- def check_event_trigger_there(triggers) result = false # 事件执行中的情况下 if $game_system.map_interpreter.running? return result end # 计算正面坐标 new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0) new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0) # 全部事件的循环 for event in $game_map.events.values # 事件坐标与目标一致的情况下 if event.x == new_x and event.y == new_y and triggers.include?(event.trigger) # 跳跃中以外的情况下、启动判定是正面的事件 if not event.jumping? and not event.over_trigger? event.start result = true end end end # 找不到符合条件的事件的情况下 if result == false # 正面的元件是计数器的情况下 if $game_map.counter?(new_x, new_y) # 计算 1 元件里侧的坐标 new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0) new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0) # 全事件的循环 for event in $game_map.events.values # 事件坐标与目标一致的情况下 if event.x == new_x and event.y == new_y and triggers.include?(event.trigger) # 跳跃中以外的情况下、启动判定是正面的事件 if not event.jumping? and not event.over_trigger? event.start result = true end end end end end return result end #-------------------------------------------------------------------------- # ● 接触事件启动判定 #-------------------------------------------------------------------------- def check_event_trigger_touch(x, y) result = false # 事件执行中的情况下 if $game_system.map_interpreter.running? return result end # 全事件的循环 for event in $game_map.events.values # 事件坐标与目标一致的情况下 if event.x == x and event.y == y and [1,2].include?(event.trigger) # 跳跃中以外的情况下、启动判定是正面的事件 if not event.jumping? and not event.over_trigger? event.start result = true end end end return result end #-------------------------------------------------------------------------- # ● 画面更新 #-------------------------------------------------------------------------- def update # 本地变量记录移动信息 last_moving = moving? # 移动中、事件执行中、强制移动路线中、 # 信息窗口一个也不显示的时候 unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing # 如果方向键被按下、主角就朝那个方向移动 case Input.dir4 when 2 move_down when 4 move_left when 6 move_right when 8 move_up end end # 本地变量记忆坐标 last_real_x = @real_x last_real_y = @real_y super # 角色向下移动、画面上的位置在中央下方的情况下 if @real_y & last_real_y and @real_y - $game_map.display_y & CENTER_Y # 画面向下卷动 $game_map.scroll_down(@real_y - last_real_y) end # 角色向左移动、画面上的位置在中央左方的情况下 if @real_x & last_real_x and @real_x - $game_map.display_x & CENTER_X # 画面向左卷动 $game_map.scroll_left(last_real_x - @real_x) end # 角色向右移动、画面上的位置在中央右方的情况下 if @real_x & last_real_x and @real_x - $game_map.display_x & CENTER_X # 画面向右卷动 $game_map.scroll_right(@real_x - last_real_x) end # 角色向上移动、画面上的位置在中央上方的情况下 if @real_y & last_real_y and @real_y - $game_map.display_y & CENTER_Y # 画面向上卷动 $game_map.scroll_up(last_real_y - @real_y) end # 不在移动中的情况下 unless moving? # 上次主角移动中的情况 if last_moving # 与同位置的事件接触就判定为事件启动 result = check_event_trigger_here([1,2]) # 没有可以启动的事件的情况下 if result == false # 调试模式为 ON 并且按下 CTRL 键的情况下除外 unless $DEBUG and Input.press?(Input::CTRL) # 遇敌计数下降 if @encounter_count & 0 @encounter_count -= 1 end end end end # 按下 C 键的情况下 if Input.trigger?(Input::C) # 判定为同位置以及正面的事件启动 check_event_trigger_here([0]) check_event_trigger_there([0,1,2]) end end end end
一般来说场景绘制和脚本是没有任何关系的,楼主把这张地图复制到新建工程文件里看看会不会报错。如果不报错,说明这是单纯的脚本冲突,建议重组脚本系统。
删文件夹你就直接删呗,还脚本删文件夹,闲的慌。
是动脚本了吗?或者删了什么东西?(或者是病毒?=v=可能8大=v=)
我用RPG Maker XP修改一个叫热血物语的游戏 可是修改完后点保存却没用。。关闭RPG Maker XP就提示:是否保存? 我选:是 然后没反应。。 应该怎么决绝注:不是像载入边框之类的,而是修改成大概这个样子。开始页面是这个类型。
这是凤大人的脚本,可以突破队伍上限(脚本第4行改人数上限),战斗时可以换人……功能有很多。不过第7行的出战人数最好是4人,因为第4个队友之后就不会显示了,连选择框都不会显示。一些“换人”啊,“出战”啊,“待战”啊,自己在脚本里改(不会再)。记住角色死了就不能换了!不说了上脚本:我.怕.直.接.发.脚.本.会.被.度.娘.删.了。不懂或不会。
打开脚本编辑器,将Game_Player内内容全部删除,将以下脚本复制进去保存再试试#==============================================================================# ■ Game_Player#------------------------------------------------------------------------------#
处理主角的类。事件启动的判定、以及地图的滚动等功能。# 本类的实例请参考 $game_player。#==============================================================================class Game_Player & Game_Character
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
CENTER_X = (320 - 16) * 4
# 画面中央的 X 坐标 * 4
CENTER_Y = (240 - 16) * 4
# 画面中央的 Y 坐标 * 4
#--------------------------------------------------------------------------
# ● 可以通行判定
x : X 坐标
y : Y 坐标
d : 方向 (0,2,4,6,8)
※ 0 = 全方向不能通行的情况判定 (跳跃用)
#--------------------------------------------------------------------------
def passable?(x, y, d)
# 求得新的坐标
new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
# 坐标在地图外的情况下
unless $game_map.valid?(new_x, new_y)
# 不能通行
return false
# 调试模式为 ON 并且 按下 CTRL 键的情况下
if $DEBUG and Input.press?(Input::CTRL)
# 可以通行
return true
#--------------------------------------------------------------------------
# ● 像通到画面中央一样的设置地图的显示位置
#--------------------------------------------------------------------------
def center(x, y)
max_x = ($game_map.width - 20) * 128
max_y = ($game_map.height - 15) * 128
$game_map.display_x = [0, [x * 128 - CENTER_X, max_x].min].max
$game_map.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max
#--------------------------------------------------------------------------
# ● 向指定的位置移动
x : X 座标
y : Y 座标
#--------------------------------------------------------------------------
def moveto(x, y)
center(x, y)
# 生成遇敌计数
make_encounter_count
#--------------------------------------------------------------------------
# ● 增加步数
#--------------------------------------------------------------------------
def increase_steps
# 不是强制移动路线的场合
unless @move_route_forcing
# 增加步数
$game_party.increase_steps
# 步数是偶数的情况下
if $game_party.steps % 2 == 0
# 检查连续伤害
$game_party.check_map_slip_damage
#--------------------------------------------------------------------------
# ● 获取遇敌计数
#--------------------------------------------------------------------------
def encounter_count
return @encounter_count
#--------------------------------------------------------------------------
# ● 生成遇敌计数
#--------------------------------------------------------------------------
def make_encounter_count
# 两种颜色震动的图像
if $game_map.map_id != 0
n = $game_map.encounter_step
@encounter_count = rand(n) + rand(n) + 1
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def refresh
# 同伴人数为 0 的情况下
if $game_party.actors.size == 0
# 清除角色的文件名及对像
@character_name = &&
@character_hue = 0
# 分支结束
# 获取带头的角色
actor = $game_party.actors[0]
# 设置角色的文件名及对像
@character_name = actor.character_name
@character_hue = actor.character_hue
# 初始化不透明度和合成方式子
@opacity = 255
@blend_type = 0
#--------------------------------------------------------------------------
# ● 同位置的事件启动判定
#--------------------------------------------------------------------------
def check_event_trigger_here(triggers)
result = false
# 事件执行中的情况下
if $game_system.map_interpreter.running?
return result
# 全部事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == @x and event.y == @y and triggers.include?(event.trigger)
# 跳跃中以外的情况下、启动判定是同位置的事件
if not event.jumping? and event.over_trigger?
event.start
result = true
return result
#--------------------------------------------------------------------------
# ● 正面事件的启动判定
#--------------------------------------------------------------------------
def check_event_trigger_there(triggers)
result = false
# 事件执行中的情况下
if $game_system.map_interpreter.running?
return result
# 计算正面坐标
new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 全部事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# 跳跃中以外的情况下、启动判定是正面的事件
if not event.jumping? and not event.over_trigger?
event.start
result = true
# 找不到符合条件的事件的情况下
if result == false
# 正面的元件是计数器的情况下
if $game_map.counter?(new_x, new_y)
# 计算 1 元件里侧的坐标
new_x += (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y += (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
# 全事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == new_x and event.y == new_y and
triggers.include?(event.trigger)
# 跳跃中以外的情况下、启动判定是正面的事件
if not event.jumping? and not event.over_trigger?
event.start
result = true
return result
#--------------------------------------------------------------------------
# ● 接触事件启动判定
#--------------------------------------------------------------------------
def check_event_trigger_touch(x, y)
result = false
# 事件执行中的情况下
if $game_system.map_interpreter.running?
return result
# 全事件的循环
for event in $game_map.events.values
# 事件坐标与目标一致的情况下
if event.x == x and event.y == y and [1,2].include?(event.trigger)
# 跳跃中以外的情况下、启动判定是正面的事件
if not event.jumping? and not event.over_trigger?
event.start
result = true
return result
#--------------------------------------------------------------------------
# ● 画面更新
#--------------------------------------------------------------------------
def update
# 本地变量记录移动信息
last_moving = moving?
# 移动中、事件执行中、强制移动路线中、
# 信息窗口一个也不显示的时候
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
# 如果方向键被按下、主角就朝那个方向移动
case Input.dir4
move_right
# 本地变量记忆坐标
last_real_x = @real_x
last_real_y = @real_y
# 角色向下移动、画面上的位置在中央下方的情况下
if @real_y & last_real_y and @real_y - $game_map.display_y & CENTER_Y
# 画面向下卷动
$game_map.scroll_down(@real_y - last_real_y)
# 角色向左移动、画面上的位置在中央左方的情况下
if @real_x & last_real_x and @real_x - $game_map.display_x & CENTER_X
# 画面向左卷动
$game_map.scroll_left(last_real_x - @real_x)
# 角色向右移动、画面上的位置在中央右方的情况下
if @real_x & last_real_x and @real_x - $game_map.display_x & CENTER_X
# 画面向右卷动
$game_map.scroll_right(@real_x - last_real_x)
# 角色向上移动、画面上的位置在中央上方的情况下
if @real_y & last_real_y and @real_y - $game_map.display_y & CENTER_Y
# 画面向上卷动
$game_map.scroll_up(last_real_y - @real_y)
# 不在移动中的情况下
unless moving?
# 上次主角移动中的情况
if last_moving
# 与同位置的事件接触就判定为事件启动
result = check_event_trigger_here([1,2])
# 没有可以启动的事件的情况下
if result == false
# 调试模式为 ON 并且按下 CTRL 键的情况下除外
unless $DEBUG and Input.press?(Input::CTRL)
# 遇敌计数下降
if @encounter_count & 0
@encounter_count -= 1
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 判定为同位置以及正面的事件启动
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
所有的一次性事件、宝箱、任务,最简单的方法就是使用独立开关,以你这个主角撞击事件为例,在这个事件里面新建一个事件页,第一页执行你要执行的事件内容,在最后一行添加一个“独立开关A为ON”,第二页如果你没有其他需要执行的,就直接将左上方的“独立开关A为ON”勾上。这样就可以了。
人的综合分
感谢您为社区的和谐贡献力量请选择举报类型
经过核实后将会做出处理感谢您为社区和谐做出贡献
确定要取消此次报名,退出该活动?29被浏览1,566分享邀请回答36 条评论分享收藏感谢收起写回答}