赞 | 40 |
VIP | 0 |
好人卡 | 72 |
积分 | 63 |
经验 | 38967 |
最后登录 | 2024-11-5 |
在线时间 | 1481 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 6260
- 在线时间
- 1481 小时
- 注册时间
- 2015-7-25
- 帖子
- 652
|
给楼主写了一段模仿XP的战斗界面的脚本,不过并不是完全一样哦=w=(想实现剩下的未完成的功能的话,还需要楼主自己去学习写哦~)
在pictures文件夹里放入你的角色图片,名字跟你角色使用的脸图名一样哦,不过....每个角色的脸图的话需要使用不同的文件名(一张脸图存一份不同文件名自己ps把脸图割开~)
- class Window_BattleStatus < Window_Selectable
- def visible_line_number
- return 1
- end
- def window_width
- Graphics.width
- end
- def window_height
- fitting_height(4)
- end
- def col_max
- return 4
- end
- def item_height
- line_height*4
- end
- def draw_item(index)
- actor = $game_party.battle_members[index]
- actor_x = index * 544/4 + 4
- draw_actor_lh(actor, actor_x, 0)
- draw_actor_name(actor, actor_x,0)
- draw_text_ex(actor_x, 30, "HP")
- draw_text_ex(actor_x+70, 30, actor.hp)
- draw_text_ex(actor_x, 55, "SP")
- draw_text_ex(actor_x+70, 55, actor.mp)
- end
- def draw_actor_lh(actor, x, y, enabled = true)
- draw_lh(actor.face_name, actor.face_index, x, y, enabled)
- end
- def draw_lh(face_name, face_index, x, y, enabled = true)
- bitmap = Cache.picture(face_name)
- rect = Rect.new(face_index, face_index, 96*2, 96*2)
- contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
- bitmap.dispose
- end
- end
- class Window_PartyCommand < Window_Command
- def visible_line_number
- return 1
- end
- def col_max
- return 2
- end
- def window_width
- return 544
- end
- end
- class Scene_Battle < Scene_Base
- def create_status_window
- @status_window = Window_BattleStatus.new
- @status_window.x = 0
- @status_window.y = 416-@status_window.height
- end
- def create_party_command_window
- @party_command_window = Window_PartyCommand.new
- @party_command_window.x = 0
- @party_command_window.y = 0
- @party_command_window.set_handler(:fight, method(:command_fight))
- @party_command_window.set_handler(:escape, method(:command_escape))
- @party_command_window.unselect
- end
- def create_actor_command_window
- @actor_command_window = Window_ActorCommand.new
- @actor_command_window.x = 0
- @actor_command_window.y = 416-@status_window.height*2
- @actor_command_window.set_handler(:attack, method(:command_attack))
- @actor_command_window.set_handler(:skill, method(:command_skill))
- @actor_command_window.set_handler(:guard, method(:command_guard))
- @actor_command_window.set_handler(:item, method(:command_item))
- @actor_command_window.set_handler(:cancel, method(:prior_command))
- end
- def create_info_viewport
- @info_viewport = Viewport.new
- @info_viewport.rect.y = Graphics.height - @status_window.height
- @info_viewport.rect.height = @status_window.height
- @info_viewport.z = 100
- @info_viewport.ox = 64
- end
- end
复制代码
|
评分
-
查看全部评分
|