| 赞 | 6  | 
 
| VIP | 22 | 
 
| 好人卡 | 15 | 
 
| 积分 | 13 | 
 
| 经验 | 97563 | 
 
| 最后登录 | 2022-11-26 | 
 
| 在线时间 | 831 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 1344 
 
        - 在线时间
 - 831 小时
 
        - 注册时间
 - 2007-12-25
 
        - 帖子
 - 1558
 
 
 
 | 
	
给你写了个定做 
不认可对不起我 
- #========================================================================
 
 - #按下回车不移动定做
 
 - #可以更改开关 (第8行,默认101)打开时停用此功能
 
 - #=====================================================================
 
  
- class Game_Player < Game_Character
 
 -    def update
 
 -      @swtf = 101
 
 -     # 本地变量记录移动信息
 
 -     last_moving = moving?
 
 -     # 移动中、事件执行中、强制移动路线中、
 
 -     # 信息窗口一个也不显示的时候
 
 -     unless moving? or $game_system.map_interpreter.running? or
 
 -            @move_route_forcing or $game_temp.message_window_showing
 
 -       # 如果方向键被按下、主角就朝那个方向移动
 
 -       if Input.press?(Input::C)==false and $game_switches[@swtf] ==false
 
 -         case Input.dir4
 
 -           when 2
 
 -             move_down 
 
 -           when 4
 
 -             move_left 
 
 -           when 6
 
 -             move_right 
 
 -           when 8
 
 -             move_up 
 
 -         end
 
 -       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
 
  复制代码 
另外不知道你是否需要按下回车后任然能转向!这个不支持 
 
如果你要的是按下回车键后可以转向的话 
 
- #======================================================================
 
 - #该脚本为定做脚本
 
 - #其作用为按下回车键后角色不能移动,但是能转向
 
 - #======================================================================
 
  
- class Game_Character
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 向下移动
 
 -   #     turn_enabled : 本场地位置更改许可标志
 
 -   #--------------------------------------------------------------------------
 
 -   def move_down(turn_enabled = true)
 
 -     # 面向下
 
 -     if turn_enabled
 
 -       turn_down
 
 -     end
 
 -     # 可以通行的场合
 
 -     if passable?(@x, @y, 2) and Input.press?(Input::C) == false
 
 -       # 面向下
 
 -       turn_down
 
 -       # 更新坐标
 
 -       @y += 1
 
 -       # 增加步数
 
 -       increase_steps
 
 -     # 不能通行的情况下
 
 -     else
 
 -       # 接触事件的启动判定
 
 -       check_event_trigger_touch(@x, @y+1)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 向左移动
 
 -   #     turn_enabled : 本场地位置更改许可标志
 
 -   #--------------------------------------------------------------------------
 
 -   def move_left(turn_enabled = true)
 
 -     # 面向左
 
 -     if turn_enabled
 
 -       turn_left
 
 -     end
 
 -     # 可以通行的情况下
 
 -     if passable?(@x, @y, 4) and Input.press?(Input::C) == false
 
 -       # 面向左
 
 -       turn_left
 
 -       # 更新坐标
 
 -       @x -= 1
 
 -       # 增加步数
 
 -       increase_steps
 
 -     # 不能通行的情况下
 
 -     else
 
 -       # 接触事件的启动判定
 
 -       check_event_trigger_touch(@x-1, @y)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 向右移动
 
 -   #     turn_enabled : 本场地位置更改许可标志
 
 -   #--------------------------------------------------------------------------
 
 -   def move_right(turn_enabled = true)
 
 -     # 面向右
 
 -     if turn_enabled
 
 -       turn_right
 
 -     end
 
 -     # 可以通行的场合
 
 -     if passable?(@x, @y, 6) and Input.press?(Input::C) == false
 
 -       # 面向右
 
 -       turn_right
 
 -       # 更新坐标
 
 -       @x += 1
 
 -       # 增加部数
 
 -       increase_steps
 
 -     # 不能通行的情况下
 
 -     else
 
 -       # 接触事件的启动判定
 
 -       check_event_trigger_touch(@x+1, @y)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 向上移动
 
 -   #     turn_enabled : 本场地位置更改许可标志
 
 -   #--------------------------------------------------------------------------
 
 -   def move_up(turn_enabled = true)
 
 -     # 面向上
 
 -     if turn_enabled
 
 -       turn_up
 
 -     end
 
 -     # 可以通行的情况下
 
 -     if passable?(@x, @y, 8) and Input.press?(Input::C) == false
 
 -       # 面向上
 
 -       turn_up
 
 -       # 更新坐标
 
 -       @y -= 1
 
 -       # 歩数増加
 
 -       increase_steps
 
 -     # 不能通行的情况下
 
 -     else
 
 -       # 接触事件的启动判定
 
 -       check_event_trigger_touch(@x, @y-1)
 
 -     end
 
 -   end
 
 - end  
 
  复制代码 
 
最后要说的就是,事件调用移动也会受到操作的影响 
解决方法是在事件移动之前打开对应开关,第二个脚本暂时没有开放禁用 
需要联系我  系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~ |   
 
 
 
 |