查看: 2004|回复: 2

[已经过期] 新人请教,脚本冲突问题

[复制链接]
梦石
0
星屑
800
在线时间
2 小时
注册时间
2015-6-26
回帖
2
发表于 2015-7-12 14:58:03 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 RyanBern 于 2015-7-13 20:25 编辑
  1. #==============================================================================

  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息

  3. #==============================================================================


  4. # ————————————————————————————————————



  5. # ▼▲▼ XRXS13. パーティ列車移動 ver.1.02 ▼▲▼

  6. # by fukuyama



  7. # 分开一段距离跟随

  8. # by 叶子

  9. #

  10. # Train_Actor

  11. #

  12. # [email]fukuyama@alles.or.jp[/email]

  13. # [url]http://www4.big.or.jp/~fukuyama/rgss/Train_Actor.txt[/url]

  14. #



  15. module Train_Actor


  16. #是否使用停止跟随的方法,也就是说,这里false改为true的时候,如果TRANSPARENT_SWITCHES_INDEX

  17. #开关打开,跟随的人物就消失了(其实只是变成透明而已)

  18. TRANSPARENT_SWITCH = true

  19. TRANSPARENT_SWITCHES_INDEX = 96

  20. #举例:第一个为true,第二个为20,则打开20号开关,后面的人都没了。

  21. #跟随人数的最大数目,可以更改为2、3什么的。

  22. TRAIN_ACTOR_SIZE_MAX = 4





  23. # 跟随距离,例如0为紧贴,1为分开一个身位

  24. TRAIN_ACTOR_DISTANCE = 1







  25. # 定数

  26. #Input::DOWN = 2

  27. #Input::LEFT = 4

  28. #Input::RIGHT = 6

  29. #Input::UP = 6

  30. DOWN_LEFT = 1

  31. DOWN_RIGHT = 3

  32. UP_LEFT = 7

  33. UP_RIGHT = 9

  34. JUMP = 5



  35. # 叶子到此一游

  36. # 插入空角色,造成分开一段距离跟随的假象

  37. TRAIN_ACTOR_SIZE_MAX = TRAIN_ACTOR_SIZE_MAX * (TRAIN_ACTOR_DISTANCE+1) + 1

  38. class Game_Party_Actor < Game_Character

  39. def initialize

  40. super()

  41. @through = true

  42. end

  43. def setup(actor)

  44. # キャラクターのファイル名と色相を設定

  45. if actor != nil

  46. @character_name = actor.character_name

  47. @character_hue = actor.character_hue

  48. else

  49. @character_name = ""

  50. @character_hue = 0

  51. end

  52. # 不透明度と合成方法を初期化

  53. @opacity = 255

  54. @blend_type = 0

  55. end

  56. def screen_z(height = 0)

  57. if $game_player.x == @x and $game_player.y == @y

  58. return $game_player.screen_z(height) - 1

  59. end

  60. super(height)

  61. end

  62. #--------------------------------------------------------------------------

  63. # ● 下に移動

  64. # turn_enabled : その場での向き変更を許可するフラグ

  65. #--------------------------------------------------------------------------

  66. def move_down(turn_enabled = true)

  67. # 下を向く

  68. if turn_enabled

  69. turn_down

  70. end

  71. # 通行可能な場合

  72. if passable?(@x, @y, Input::DOWN)

  73. # 下を向く

  74. turn_down

  75. # 座標を更新

  76. @y += 1

  77. end

  78. end

  79. #--------------------------------------------------------------------------

  80. # ● 左に移動

  81. # turn_enabled : その場での向き変更を許可するフラグ

  82. #--------------------------------------------------------------------------

  83. def move_left(turn_enabled = true)

  84. # 左を向く

  85. if turn_enabled

  86. turn_left

  87. end

  88. # 通行可能な場合

  89. if passable?(@x, @y, Input::LEFT)

  90. # 左を向く

  91. turn_left

  92. # 座標を更新

  93. @x -= 1

  94. end

  95. end

  96. #--------------------------------------------------------------------------

  97. # ● 右に移動

  98. # turn_enabled : その場での向き変更を許可するフラグ

  99. #--------------------------------------------------------------------------

  100. def move_right(turn_enabled = true)

  101. # 右を向く

  102. if turn_enabled

  103. turn_right

  104. end

  105. # 通行可能な場合

  106. if passable?(@x, @y, Input::RIGHT)

  107. # 右を向く

  108. turn_right

  109. # 座標を更新

  110. @x += 1

  111. end

  112. end

  113. #--------------------------------------------------------------------------

  114. # ● 上に移動

  115. # turn_enabled : その場での向き変更を許可するフラグ

  116. #--------------------------------------------------------------------------

  117. def move_up(turn_enabled = true)

  118. # 上を向く

  119. if turn_enabled

  120. turn_up

  121. end

  122. # 通行可能な場合

  123. if passable?(@x, @y, Input::UP)

  124. # 上を向く

  125. turn_up

  126. # 座標を更新

  127. @y -= 1

  128. end

  129. end

  130. #--------------------------------------------------------------------------

  131. # ● 左下に移動

  132. #--------------------------------------------------------------------------

  133. def move_lower_left

  134. # 向き固定でない場合

  135. unless @direction_fix

  136. # 右向きだった場合は左を、上向きだった場合は下を向く

  137. @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::UP ? Input::DOWN : @direction)

  138. end

  139. # 下→左、左→下 のどちらかのコースが通行可能な場合

  140. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or

  141. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))

  142. # 座標を更新

  143. @x -= 1

  144. @y += 1

  145. end

  146. end

  147. #--------------------------------------------------------------------------

  148. # ● 右下に移動

  149. #--------------------------------------------------------------------------

  150. def move_lower_right

  151. # 向き固定でない場合

  152. unless @direction_fix

  153. # 左向きだった場合は右を、上向きだった場合は下を向く

  154. @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::UP ? Input::DOWN : @direction)

  155. end

  156. # 下→右、右→下 のどちらかのコースが通行可能な場合

  157. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or

  158. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))

  159. # 座標を更新

  160. @x += 1

  161. @y += 1

  162. end

  163. end

  164. #--------------------------------------------------------------------------

  165. # ● 左上に移動

  166. #--------------------------------------------------------------------------

  167. def move_upper_left

  168. # 向き固定でない場合

  169. unless @direction_fix

  170. # 右向きだった場合は左を、下向きだった場合は上を向く

  171. @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::DOWN ? Input::UP : @direction)

  172. end

  173. # 上→左、左→上 のどちらかのコースが通行可能な場合

  174. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or

  175. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))

  176. # 座標を更新

  177. @x -= 1

  178. @y -= 1

  179. end

  180. end

  181. #--------------------------------------------------------------------------

  182. # ● 右上に移動

  183. #--------------------------------------------------------------------------

  184. def move_upper_right

  185. # 向き固定でない場合

  186. unless @direction_fix

  187. # 左向きだった場合は右を、下向きだった場合は上を向く

  188. @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::DOWN ? Input::UP : @direction)

  189. end

  190. # 上→右、右→上 のどちらかのコースが通行可能な場合

  191. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or

  192. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))

  193. # 座標を更新

  194. @x += 1

  195. @y -= 1

  196. end

  197. end

  198. attr_writer :move_speed

  199. attr_writer :step_anime

  200. end

  201. module Spriteset_Map_Module

  202. def setup_actor_character_sprites?

  203. return @setup_actor_character_sprites_flag != nil

  204. end

  205. def setup_actor_character_sprites(characters)

  206. if !setup_actor_character_sprites?

  207. index_game_player = 0

  208. @character_sprites.each_index do |i|

  209. if @character_sprites[i].character.instance_of?(Game_Player)

  210. index_game_player = i

  211. break

  212. end

  213. end

  214. for character in characters.reverse

  215. @character_sprites.unshift(

  216. Sprite_Character.new(@viewport1, character)

  217. )

  218. end

  219. @setup_actor_character_sprites_flag = true

  220. end

  221. end

  222. end

  223. module Scene_Map_Module

  224. def setup_actor_character_sprites(characters)

  225. @spriteset.setup_actor_character_sprites(characters)

  226. end

  227. end

  228. module Game_Party_Module

  229. def set_transparent_actors(transparent)

  230. @transparent = transparent

  231. end

  232. def setup_actor_character_sprites

  233. if @characters == nil

  234. # 叶子到此一游

  235. @characters = []

  236. for i in 1 ... TRAIN_ACTOR_SIZE_MAX

  237. @characters.push(Game_Party_Actor.new)

  238. end

  239. end

  240. for i in 1 ... TRAIN_ACTOR_SIZE_MAX

  241. # 叶子到此一游

  242. if i % (TRAIN_ACTOR_DISTANCE+1) == 0

  243. @characters[i-1].setup(actors[i/(TRAIN_ACTOR_DISTANCE+1)])

  244. end

  245. end

  246. if $scene.class.method_defined?('setup_actor_character_sprites')

  247. $scene.setup_actor_character_sprites(@characters)

  248. end

  249. end

  250. def update_party_actors

  251. setup_actor_character_sprites

  252. transparent = $game_player.transparent

  253. if transparent == false

  254. if TRANSPARENT_SWITCH

  255. transparent = $game_switches[TRANSPARENT_SWITCHES_INDEX]

  256. end

  257. end

  258. for character in @characters

  259. character.transparent = transparent

  260. character.move_speed = $game_player.move_speed

  261. character.step_anime = $game_player.step_anime

  262. character.update

  263. end

  264. end

  265. def moveto_party_actors( x, y )

  266. setup_actor_character_sprites

  267. for character in @characters

  268. character.moveto( x, y )

  269. end

  270. if @move_list == nil

  271. @move_list = []

  272. end

  273. move_list_setup

  274. end

  275. def move_party_actors

  276. if @move_list == nil

  277. @move_list = []

  278. move_list_setup

  279. end

  280. @move_list.each_index do |i|

  281. if @characters[i] != nil

  282. case @move_list[i].type

  283. when Input::DOWN

  284. @characters[i].move_down(@move_list[i].args[0])

  285. when Input::LEFT

  286. @characters[i].move_left(@move_list[i].args[0])

  287. when Input::RIGHT

  288. @characters[i].move_right(@move_list[i].args[0])

  289. when Input::UP

  290. @characters[i].move_up(@move_list[i].args[0])

  291. when DOWN_LEFT

  292. @characters[i].move_lower_left

  293. when DOWN_RIGHT

  294. @characters[i].move_lower_right

  295. when UP_LEFT

  296. @characters[i].move_upper_left

  297. when UP_RIGHT

  298. @characters[i].move_upper_right

  299. when JUMP

  300. @characters[i].jump(@move_list[i].args[0],@move_list[i].args[1])

  301. end

  302. end

  303. end

  304. end

  305. class Move_List_Element
  306. def initialize(type,args)
  307. @type = type
  308. @args = args
  309. end

  310. def type() return @type end

  311. def args() return @args end
  312. end

  313. def move_list_setup
  314. for i in 0 .. TRAIN_ACTOR_SIZE_MAX
  315. @move_list[i] = nil
  316. end
  317. end

  318. def add_move_list(type,*args)
  319. @move_list.unshift(Move_List_Element.new(type,args)).pop
  320. end

  321. def move_down_party_actors(turn_enabled = true)
  322. move_party_actors
  323. add_move_list(Input::DOWN,turn_enabled)
  324. end

  325. def move_left_party_actors(turn_enabled = true)
  326. move_party_actors
  327. add_move_list(Input::LEFT,turn_enabled)
  328. end

  329. def move_right_party_actors(turn_enabled = true)
  330. move_party_actors
  331. add_move_list(Input::RIGHT,turn_enabled)
  332. end

  333. def move_up_party_actors(turn_enabled = true)
  334. move_party_actors
  335. add_move_list(Input::UP,turn_enabled)
  336. end

  337. def move_lower_left_party_actors
  338. move_party_actors
  339. add_move_list(DOWN_LEFT)
  340. end

  341. def move_lower_right_party_actors
  342. move_party_actors
  343. add_move_list(DOWN_RIGHT)
  344. end

  345. def move_upper_left_party_actors
  346. move_party_actors
  347. add_move_list(UP_LEFT)
  348. end

  349. def move_upper_right_party_actors
  350. move_party_actors
  351. add_move_list(UP_RIGHT)
  352. end

  353. def jump_party_actors(x_plus, y_plus)
  354. move_party_actors
  355. add_move_list(JUMP,x_plus, y_plus)
  356. end
  357. end

  358. module Game_Player_Module
  359. def update
  360. $game_party.update_party_actors
  361. super
  362. end

  363. def moveto( x, y )
  364. $game_party.moveto_party_actors( x, y )
  365. super( x, y )
  366. end

  367. def move_down(turn_enabled = true)
  368. if passable?(@x, @y, Input::DOWN)
  369. $game_party.move_down_party_actors(turn_enabled)
  370. end
  371. super(turn_enabled)
  372. end

  373. def move_left(turn_enabled = true)
  374. if passable?(@x, @y, Input::LEFT)
  375. $game_party.move_left_party_actors(turn_enabled)
  376. end
  377. super(turn_enabled)
  378. end

  379. def move_right(turn_enabled = true)
  380. if passable?(@x, @y, Input::RIGHT)
  381. $game_party.move_right_party_actors(turn_enabled)
  382. end
  383. super(turn_enabled)
  384. end

  385. def move_up(turn_enabled = true)
  386. if passable?(@x, @y, Input::UP)
  387. $game_party.move_up_party_actors(turn_enabled)
  388. end
  389. super(turn_enabled)
  390. end

  391. def move_lower_left
  392. # 下→左、左→下 のどちらかのコースが通行可能な場合
  393. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or
  394. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))
  395. $game_party.move_lower_left_party_actors
  396. end
  397. super
  398. end

  399. def move_lower_right
  400. # 下→右、右→下 のどちらかのコースが通行可能な場合
  401. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or
  402. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))
  403. $game_party.move_lower_right_party_actors
  404. end
  405. super
  406. end

  407. def move_upper_left
  408. # 上→左、左→上 のどちらかのコースが通行可能な場合
  409. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or
  410. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))
  411. $game_party.move_upper_left_party_actors
  412. end
  413. super
  414. end

  415. def move_upper_right
  416. # 上→右、右→上 のどちらかのコースが通行可能な場合
  417. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or
  418. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))
  419. $game_party.move_upper_right_party_actors
  420. end
  421. super
  422. end

  423. def jump(x_plus, y_plus)
  424. # 新しい座標を計算
  425. new_x = @x + x_plus
  426. new_y = @y + y_plus
  427. # 加算値が (0,0) の場合か、ジャンプ先が通行可能な場合
  428. if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)
  429. $game_party.jump_party_actors(x_plus, y_plus)
  430. end
  431. super(x_plus, y_plus)
  432. end
  433. attr_reader :move_speed
  434. attr_reader :step_anime
  435. end
  436. end # module Train_Actor

  437. class Game_Party
  438. include Train_Actor::Game_Party_Module
  439. end

  440. class Game_Player
  441. include Train_Actor::Game_Player_Module
  442. end

  443. class Spriteset_Map
  444. include Train_Actor::Spriteset_Map_Module
  445. end

  446. class Scene_Map
  447. include Train_Actor::Scene_Map_Module
  448. end

  449. #==============================================================================
  450. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  451. #==============================================================================









  452. #==============================================================================
  453. # 本脚本来自[url]www.66rpg.com[/url],转载、使用请保留此信息
  454. #==============================================================================

  455. #--------------------------------------#
  456. #  大话西游单机论坛  [url]www.ie886.com[/url]     #
  457. #--------------------------------------#

  458. # 作者:柳柳
  459. #
  460. # 使用方法:插入到main前即可,之后就会显示每个事件的名字。
  461. # 不想显示名字的NPC直接把名字设置为一个空格就行了。
  462. #
  463. # 附加功能:名字颜色区分:比如一个NPC的名字是  柳柳,2  就会用2号颜色(红色)显示
  464. #
  465. # 修改NPC名的方法:$game_map.events[事件ID编号].name =
  466. # 比如某个宝箱,原名宝箱,打开后名为“打开的宝箱”,则
  467. # $game_map.events[@event_id].name = "打开的宝箱" 或者
  468. # $game_map.events[2].name = "打开的宝箱" (假设宝箱是2号事件)
  469. #
  470. # 修改颜色定义:70-88行,131-149行,自己随便改。
  471. #
  472. # 给主角带上名字:192行,改 "" 为 "主角" 或者 $game_party.actors[0].name 即可
  473. #
  474. $c3_每一步的帧数 = 4
  475. $c3_总共可用的方向数 = 4 #是否显示姓名的开关:182行,开头的井号去掉。则以后39号开关打开的时候才会显示姓名
  476. #
  477. #==============================================================================
  478. # ■ Game_Event
  479. #------------------------------------------------------------------------------
  480. #  处理事件的类。条件判断、事件页的切换、并行处理、执行事件功能
  481. # 在 Game_Map 类的内部使用。
  482. #==============================================================================
  483. class Game_Event < Game_Character
  484. #——————————————————————————————————————
  485. # 用来返回名称
  486. #——————————————————————————————————————
  487. def name
  488.    return @event.name
  489. end  
  490. def name=(newname)
  491.    @event.name = newname
  492. end
  493. end

  494. #==============================================================================
  495. # ■ Sprite_Character
  496. #------------------------------------------------------------------------------
  497. #  角色显示用脚本。监视 Game_Character 类的实例、
  498. # 自动变化脚本状态。
  499. #==============================================================================

  500. class Sprite_Character < RPG::Sprite
  501. #--------------------------------------------------------------------------
  502. # ● 定义实例变量
  503. #--------------------------------------------------------------------------
  504. attr_accessor :character                # 角色
  505.    #--------------------------------------------------------------------------
  506. # ● 初始化对像
  507. #     viewport  : 查看端口
  508. #     character : 角色 (Game_Character)
  509. #--------------------------------------------------------------------------
  510. def initialize(viewport, character = nil)
  511.    name = character.name
  512.    super(viewport)
  513.    [url=home.php?mod=space&uid=2631396]@character[/url] = character

  514.    @namesprite = Sprite.new(viewport) ################小雪
  515.    @namesprite.bitmap = Bitmap.new(255, 200)
  516.    @namesprite.bitmap.font.name ="宋体"
  517.    @namesprite.bitmap.font.size = 16
  518.    @namesprite.bitmap.font.color.set(60, 255, 120)
  519.    @evname = name
  520.    @evname_split = name.split(/,/)[0]
  521.    if name[0, 2]=="EV"
  522.      @evname_split = " "
  523.    end
  524.    if name.split(/,/)[1] != nil
  525.      case name.split(/,/)[1]
  526.      when "0"
  527.        @namesprite.bitmap.font.color.set(255, 255, 255)
  528.      when "1"
  529.        @namesprite.bitmap.font.color.set(128, 128, 255)
  530.      when "2"
  531.        @namesprite.bitmap.font.color.set(255, 128, 128)
  532.      when "3"
  533.        @namesprite.bitmap.font.color.set(128, 255, 128)
  534.      when "4"
  535.        @namesprite.bitmap.font.color.set(128, 255, 255)
  536.      when "5"
  537.        @namesprite.bitmap.font.color.set(255, 128, 255)
  538.      when "6"
  539.        @namesprite.bitmap.font.color.set(255, 255, 128)
  540.      when "7"
  541.        @namesprite.bitmap.font.color.set(192, 192, 192)
  542.      else
  543.        @namesprite.bitmap.font.color.set(255, 255, 255)
  544.      end
  545.    end
  546.    if @evname_split != "" and @evname_split != nil
  547.       @namesprite.bitmap.font.size = 16
  548.          y = 110
  549.       @namesprite.bitmap.draw_text(40, y, 200, 25, @evname_split, 1)
  550.    end
  551.    #----------------------------

  552.    update
  553. end
  554.    #--------------------------------------------------------------------------
  555. # ● 更新画面
  556. #--------------------------------------------------------------------------
  557. def update
  558.    super
  559.    # 元件 ID、文件名、色相与现在的情况存在差异的情况下
  560.    if @tile_id != @character.tile_id or
  561.       @character_name != @character.character_name or
  562.       @character_hue != @character.character_hue
  563.      # 记忆元件 ID 与文件名、色相
  564.      @tile_id = @character.tile_id
  565.      @character_name = @character.character_name
  566.      @character_hue = @character.character_hue
  567.      # 元件 ID 为有效值的情况下
  568.      if @tile_id >= 384
  569.         self.bitmap = RPG::Cache.tile($game_map.tileset_name,
  570.           @tile_id, @character.character_hue)
  571.         self.src_rect.set(0, 0, 32, 32)
  572.         self.ox = 16
  573.         self.oy = 32
  574.       # 元件 ID 为无效值的情况下
  575.       else
  576.         self.bitmap = RPG::Cache.character(@character.character_name,
  577.           @character.character_hue)
  578.         @cw = bitmap.width / $c3_每一步的帧数
  579.         #---------------------
  580.         #if $c3_总共可用的方向数==4
  581.           #@ch = bitmap.height / 4
  582.         #else
  583.           @ch = bitmap.height / 4
  584.         #end
  585.         #-------------------------
  586.         self.ox = @cw / 2
  587.        # self.oy = @ch
  588.         self.oy = @ch / 1.13####################
  589.       end
  590.    
  591.     # 设置可视状态
  592.     self.visible = (not @character.transparent)
  593.     # 图形是角色的情况下
  594.      end
  595.    
  596.    if @evname != @character.name
  597.      @namesprite.bitmap.clear
  598.      @evname = @character.name
  599.      @evname_split = @character.name.split(/,/)[0]
  600.      if @character.name.split(/,/)[1] != nil
  601.        case @character.name.split(/,/)[1]
  602.        when "0"
  603.          @namesprite.bitmap.font.color.set(255, 255, 255)
  604.        when "1"
  605.          @namesprite.bitmap.font.color.set(128, 128, 255)
  606.        when "2"
  607.          @namesprite.bitmap.font.color.set(255, 128, 128)
  608.        when "3"
  609.          @namesprite.bitmap.font.color.set(128, 255, 128)
  610.        when "4"
  611.          @namesprite.bitmap.font.color.set(128, 255, 255)
  612.        when "5"
  613.          @namesprite.bitmap.font.color.set(255, 128, 255)
  614.        when "6"
  615.          @namesprite.bitmap.font.color.set(255, 255, 128)
  616.        when "7"
  617.          @namesprite.bitmap.font.color.set(192, 192, 192)
  618.        else
  619.          @namesprite.bitmap.font.color.set(255, 255, 255)
  620.        end
  621.      end
  622.      if @evname_split != "" and @evname_split != nil
  623.        @namesprite.bitmap.font.color.set(0,0, 0)
  624.    
  625.        @namesprite.bitmap.draw_text(0, 0,160,30, @evname_split, 1)
  626.      end
  627.    end
  628.    #@namesprite.visible = $game_switches[39]
  629.    # 设置可视状态
  630.    self.visible = (not @character.transparent)
  631.    # 图形是角色的情况下
  632.     if @tile_id == 0
  633.       # 设置传送目标的矩形
  634.      
  635.       sx = @character.pattern * @cw
  636.    
  637.       if $c3_总共可用的方向数==4
  638.         case  @character.direction            
  639.         when 2
  640.           sy = 0 * @ch
  641.         when 4
  642.           sy = 1 * @ch
  643.         when 6
  644.           sy = 2 * @ch
  645.         when 8
  646.           sy = 3 * @ch
  647.         when 1
  648.           sy = 2 * @ch
  649.         when 3
  650.           sy = 1 * @ch
  651.         when 7
  652.           sy = 3 * @ch
  653.         when 9
  654.           sy = 0 * @ch
  655.         end
  656.       else
  657.         sy = (@character.direction - 2) / 2 * @ch
  658.       end
  659.       self.src_rect.set(sx, sy, @cw, @ch)
  660.     end
  661.    # 设置脚本的坐标
  662.    self.x = @character.screen_x
  663.    self.y = @character.screen_y
  664.    self.z = @character.screen_z(@ch)
  665.    
  666.    ######################################小雪
  667.    @namesprite.x = self.x-135
  668.    @namesprite.y = self.y-self.oy-65
  669.    @namesprite.z = @character.screen_z(@ch) + 10  ####名字的优先级#####
  670.    ######################################小雪
  671.    # 设置不透明度、合成方式、茂密
  672.    self.opacity = @character.opacity
  673.    self.blend_type = @character.blend_type
  674.    self.bush_depth = @character.bush_depth
  675.    # 动画
  676.    if @character.animation_id != 0
  677.      animation = $data_animations[@character.animation_id]
  678.      animation(animation, true)
  679.      @character.animation_id = 0
  680.    end
  681. end
  682. end
  683. #==============================================================================
  684. # ■ Game_Player
  685. #------------------------------------------------------------------------------
  686. #  处理主角的类。事件启动的判定、以及地图的滚动等功能。
  687. # 本类的实例请参考 $game_player。
  688. #==============================================================================

  689. class Game_Player < Game_Character
  690. def name
  691.    return $game_party.actors[0].name   
  692. end
  693. end
  694. #==============================================================================
  695. # 本脚本来自[url]www.66rpg.com[/url],转载、使用请保留此信息
  696. #=============================================================
复制代码




感觉好多地都有问题,麻烦大神看看





梦石
0
星屑
800
在线时间
2 小时
注册时间
2015-6-26
回帖
2
 楼主| 发表于 2015-7-13 14:03:52 | 显示全部楼层
竟然没有人,55555555555555555,是不是问题太。。。其实就是以上两个脚本冲突。。。

点评

原因在于: 1、没有用代码框,难以阅读。 2、没有错误原因、类型、位置(错误时弹出的对话框),工作量过大。 改正后应该会有人回复(最好改个标题)  发表于 2015-7-13 15:20
回复

使用道具 举报

梦石
0
星屑
800
在线时间
2 小时
注册时间
2015-6-26
回帖
2
 楼主| 发表于 2015-7-13 16:56:30 | 显示全部楼层
woshixiaoye 发表于 2015-7-13 14:03
竟然没有人,55555555555555555,是不是问题太。。。其实就是以上两个脚本冲突。。。 ...

谢谢谢谢,新人不懂事。。。待我改过
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部