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

Project1

 找回密码
 注册会员
搜索

前冲脚本在用事件加EXP的时候出错

查看数: 776 | 评论数: 2 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2009-10-29 13:23

正文摘要:

本帖最后由 幻耶 于 2009-10-29 14:49 编辑 以下脚本是实现按D键让角色前冲一段距离,另外在Scene_Title的132行添加一句: $game_player.move_speed = $game_party.actors[0].agi/200.0 + 2.5 问题是:在游戏中 ...

回复

secondsen 发表于 2009-10-30 13:10:24
  1. class Game_Player
  2.   attr_accessor :move_speed
  3.   #--------------------------------------------------------------------------
  4.   # ● フレーム更新
  5.   #--------------------------------------------------------------------------
  6.   alias old_update update
  7.   def update
  8.     unless $game_system.map_interpreter.running? or
  9.       @move_route_forcing or $game_temp.message_window_showing
  10.       #if Kboard.keyb($R_Key_D) == 1
  11.       if Kboard.trigger?($R_Key_D)
  12.         if @move_speed != 6
  13.           @move_speed = 6
  14.           move_route = RPG::MoveRoute.new
  15.           move_route.repeat = false
  16.           move_route.list.clear
  17.           move_command = RPG::MoveCommand.new
  18.           move_command.code = @direction / 2
  19.           5.times{move_route.list.push(move_command.clone)}
  20.           move_command.code = 0
  21.           move_route.list.push(move_command)
  22.           force_move_route(move_route)
  23.           @character_name_run = @character_name
  24.           @character_name = @character_name + "rush"
  25.           Audio.se_play("Audio/SE/"+"013-Move01",80,100)
  26.           $game_temp.common_event_id = 1
  27.         end
  28.       else
  29.         if @move_speed != $game_party.actors[0].agi/200.0 + 2.5
  30.           @move_speed = $game_party.actors[0].agi/200.0 + 2.5
  31.           @character_name = @character_name_run
  32.         end
  33.       end  
  34.     end
  35.     old_update
  36.     if @move_route_forcing
  37.       if not @move_route.skippable and not moving? and not jumping?
  38.         @move_route_index = @move_route.list.size - 1
  39.         return
  40.       end
  41.     end
  42.   end
  43.   def refresh_start
  44.     @character_name_run = @character_name
  45.   end
  46. end
复制代码
在Scene_title  

137行

    # 刷新主角
    $game_player.refresh

之后插入
    $game_player.refresh_start
幻耶 发表于 2009-10-30 09:10:32
可以顶了吧
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2025-7-17 16:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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