Project1

标题: 确实不懂脚本修改? [打印本页]

作者: hhs467492722    时间: 2010-8-11 14:54
标题: 确实不懂脚本修改?
以下是wangswz 发给我的脚本,在游戏画面里显示HP和MP。如果要连同显示精神力到游戏画面上,该怎样修改?谢谢!

class Scene_Map < Scene_Base

  alias hpmpwindow_start start

  def start

    hpmpwindow_start

    @hpmpwindow = Window_Base.new(0, 336, 544, 80)

    if $game_switches[1] == true

    @hpmpwindow.opacity = 255

    @hpmpwindow.back_opacity = 200

    @hpmpwindow.contents_opacity = 255

    else

    @hpmpwindow.opacity = 0

    @hpmpwindow.back_opacity = 0

    @hpmpwindow.contents_opacity = 0

    end

    @temp_hp =[0,0,0,0]

    @temp_mp =[0,0,0,0]

  end

  alias hpmpwindow_update update

  def update

    for i in 0..($game_party.members.size <= 4 ? $game_party.members.size-1: 3)

    actor = $game_party.members[i]

    if @temp_hp[i] != actor.hp or @temp_mp[i] != actor.mp

      @hpmpwindow.draw_actor_hp(actor, i*136, 0 , width = 100)

      @hpmpwindow.draw_actor_mp(actor, i*136, 24, width = 100)

      @temp_hp[i] = actor.hp

      @temp_mp[i] = actor.mp

      @hpmpwindow.draw_actor_graphic(actor, i*136+40, 40)

    end

    end

    @hpmpwindow.update

    hpmpwindow_update

    if $game_switches[1] == true

    @hpmpwindow.opacity = 255

    @hpmpwindow.back_opacity = 200

    @hpmpwindow.contents_opacity = 255

    else

    @hpmpwindow.opacity = 0

    @hpmpwindow.back_opacity = 0

    @hpmpwindow.contents_opacity = 0

    end

  end

  alias hpmpwindow_terminate terminate

  def terminate

    @hpmpwindow.dispose

    hpmpwindow_terminate

  end

end

作者: wangswz    时间: 2010-8-11 16:00
draw_actor_parameter(actor, x, y, type)
默认脚本内搜索
再不会只能去学习一下脚本了




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1