查看: 2603|回复: 4

[已经过期] 求RPGXP的鼠标触摸脚本

[复制链接]
梦石
0
星屑
50
在线时间
48 小时
注册时间
2010-8-14
回帖
36
发表于 2010-9-11 04:52:28 | 显示全部楼层 |阅读模式

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

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

×
求RPGXP的鼠标触摸脚本系统。
就是与RPGVX的的鼠标触摸系统一样的RPGXP鼠标触摸脚本。

我是一个新手,以后还请大家多多指教!

点评

本版版规:内容要描述具体,标题要清晰明白。标题严禁包含“跪求”等字样。  发表于 2010-9-11 11:49
男儿膝下有黄金,下回再跪,哥送你去矿井挖煤去  发表于 2010-9-11 04:53

尽头

梦石
0
星屑
119
在线时间
278 小时
注册时间
2010-6-20
回帖
1204
发表于 2010-9-11 06:03:29 | 显示全部楼层
何必不自己尝试去修改脚本呢?
没有大胆的尝试就没有成功.
回复

使用道具 举报

头像被屏蔽

虚

梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-8-10
回帖
188
发表于 2010-9-11 08:55:30 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

梦石
0
星屑
344
在线时间
185 小时
注册时间
2007-9-2
回帖
144
发表于 2010-9-11 09:45:25 | 显示全部楼层
  1. #========================
  2. class Scene_Map
  3.   TANCE = 1 #动画ID
  4. end
  5. #========================
  6. #Game_Event========================
  7. class Game_Event
  8.   attr_reader :event
  9. end
  10. #Game_Map========================
  11. class Game_Map
  12.   def tance
  13.     for event in @events.values
  14.       if event.event.name.split(/,/)[0] == "shine"
  15.         $scene.shine.push event.event if $scene.is_a?(Scene_Map)
  16.       end
  17.     end
  18.   end
  19. end
  20. class Game_Player < Game_Character
  21.   alias tance_increase_steps increase_steps
  22.   def increase_steps
  23.     tance_increase_steps
  24.     if $scene.is_a?(Scene_Map)
  25.       $scene.check_tance
  26.     end
  27.   end
  28. end
  29. #Scene_Map========================
  30. class Scene_Map
  31.   attr_accessor :shine
  32.   def initialize
  33.     @shine = []
  34.   end
  35.   alias tance_main main
  36.   def main
  37.     $game_map.tance
  38.     @tance_wait = 0
  39.     check_tance
  40.     tance_main
  41.   end
  42.   alias tance_update update
  43.   def update
  44.     if @tance

  45.           if Input.trigger?(Input::C)

  46.           end

  47.           if @tance_wait == 0
  48.             #$game_player.animation_id = TANCE #靠近目标事件动作
  49.             $game_map.events[@tance].animation_id = TANCE
  50.             @tance_wait = 60
  51.           else
  52.             @tance_wait -= 1
  53.           end
  54.           if Input.trigger?(Input::C)
  55.             $game_map.events[@tance].start
  56.             @tance = nil
  57.           end
  58.         #=================================================
  59.     end
  60.     tance_update
  61.   end
  62.   def check_tance
  63.     for event in @shine
  64.       if (($game_player.x - event.x) ** 2 + ($game_player.y - event.y) ** 2) <= event.name.split(/,/)[1].to_i ** 2
  65.         @tance = event.id
  66.       else
  67.         @tance = false
  68.       end
  69.     end
  70.   end
  71. end
复制代码
把事件名字設定爲這樣:

shine,6

就是根據角色名字是否含有shine這個字符串來判斷事件類型,再根據 , 號後的第一個數字來判斷有效范圍。
新手作品:《幻想》———缓慢制作中———
   
合击技能!哇哈哈~~~                                                                     金山寺求宝~~~
回复

使用道具 举报

梦石
0
星屑
65
在线时间
107 小时
注册时间
2009-7-5
回帖
501
发表于 2010-9-11 17:17:09 | 显示全部楼层
人只有临死前才会发觉自己只不过是头野兽。
回合制战棋 延长的灰烬 → http://rpg.blue/thread-236963-1-2.html
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部