Project1
标题:
如何在地图中直接显示主角的血条!!
[打印本页]
作者:
jy03037318
时间:
2008-12-21 09:26
主题:《如何在地图中直接显示主角的血条!!》 原帖[LINE]1,#dddddd[/LINE]像ARPG那样直接把主角的血条显示在地图上该怎么弄???
还有就是怎么在地图上显示伤害??(这个问题无所谓,只要是上面那个血条该怎么弄?)
作者:
jy03037318
时间:
2008-12-21 09:30
标题:
如何在地图中直接显示主角的血条!!
像ARPG那样直接把主角的血条显示在地图上该怎么弄???
还有就是怎么在地图上显示伤害??(这个问题无所谓,只要是上面那个血条该怎么弄?)
[LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
后知后觉
时间:
2008-12-21 10:56
新建个窗口类。描绘队伍里队员的血条
然后在Scene_Map生成这个窗口类对象
作者:
xmj
时间:
2008-12-21 11:16
提示:
作者被禁止或删除 内容自动屏蔽
作者:
天圣的马甲
时间:
2008-12-21 14:30
参考LS给出的值槽绘制,将血条画在地图上显示的窗口里,如下:
http://rpg.blue/web/htm/news90.htm [LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
706756524
时间:
2008-12-21 15:28
提示:
作者被禁止或删除 内容自动屏蔽
作者:
hgfor
时间:
2008-12-21 16:52
re:主题:《如何在地图中直接显示主角的血条!!》 [LINE]1,#dddddd[/LINE]1. 地图上直接显示伤害脚本
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#
# 使用方法:
#
# ★、对角色显示伤害,如下3步:
#
# 1、设置伤害内容:$game_player.damage = 数值
# 注意:如果数值是负数,就变成补血的颜色了。
#
# 2、设置是否会心一击:$game_player.critical = true/false
# 如果不是会心一击,就不用这一步了
#
# 3、释放伤害:$game_player.damage_pop = true
#
#
# ★、对普通NPC和事件进行伤害,类似的3步:
#
# 1、设置伤害内容:$game_map.events[事件编号].damage = 数值
#
# 2、设置是否会心一击:$game_map.events[事件编号].critical = true/false
#
# 3、释放伤害:$game_map.events[事件编号].damage_pop = true
#
# 注意,事件编号是事件的ID号,如果目标是“本事件”,那么在事件编号输入@event_id
#
#------------------------------------------------------------------------------
# 预祝有人能早日做出华丽的ARPG来,别忘了到网站发布哦~
#------------------------------------------------------------------------------
class Sprite_Character < RPG::Sprite
alias carol3_66RPG_damage_pop_update update
def update
carol3_66RPG_damage_pop_update
if @character.damage_pop
damage(@character.damage, @character.critical)
@character.damage = nil
@character.critical = false
@character.damage_pop = false
end
#------------------------------
# 动画 ID 与当前的情况有差异的情况下
if @character.damage == nil and
@character.state_animation_id != @state_animation_id
@state_animation_id = @character.state_animation_id
loop_animation($data_animations[@state_animation_id])
end
#collapse
# 明灭
if @character.blink
blink_on
else
blink_off
end
# 白色闪烁
if @character.white_flash
whiten
@character.white_flash = false
end
# 死亡
if @character.dead
collapse
@character.dead = false
end
#------------------------------
end
end
class Game_Character
attr_accessor :damage_pop
attr_accessor :damage
attr_accessor :critical
attr_accessor :white_flash # 白色屏幕闪烁标志
attr_accessor :blink # 闪烁标志
attr_accessor :dead # 死亡消失标志
attr_accessor :state_animation_id # 状态动画ID
alias carol3_66RPG_damage_pop_initialize initialize
def initialize
@damage_pop = false
@damage = nil
@critical = false
carol3_66RPG_damage_pop_initialize
@white_flash = false
@blink = false
@dead = false
end
def state_animation_id
return @character.state_animation_id
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
地图界面中直接显示的状态显示脚本
http://rpg.blue/web/htm/news816.htm
作者:
redant
时间:
2008-12-21 17:46
re:主题:《如何在地图中直接显示主角的血条!!》 [LINE]1,#dddddd[/LINE]
DT_SWITCH = 66
#_______________________________________________________________________________
# MOG_MPW HUD Elena V2.0
#_______________________________________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
#HUD Position.
STMAPX = 476 # X Pos
STMAPY = - 16 # Y Pos
#Disable HUD Switch ID.
STMAPVIS = 1
#Windowskin name.
STMAPSKIN = ""
#Window Opacity.
STMAPOPA = 0
end
$mogscript = {} if $mogscript == nil
$mogscript["mpstelen"] = true
###############
# Window_Base #
###############
class Window_Base < Window
def draw_maphp2(actor, x, y)
text = RPG::Cache.picture("HP_Tx")
cw = text.width
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt( 75, 0, text, src_rect)
meter = RPG::Cache.picture("HP_Meter")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt( 94 ,16 , meter, src_rect)
end
#def draw_mapsp2(actor, x, y)
#meter = RPG::Cache.picture("SP_Meter")
#cw = meter.width
#ch = meter.height * actor.sp / actor.maxsp
#src_rect = Rect.new(0, 0, cw, ch)
#self.contents.blt( 81, 2, meter, src_rect)
#end
def draw_mapsp2(actor, x, y)
meter = RPG::Cache.picture("SP_Meter")
cw = meter.width
ch = 60 - meter.height * actor.sp / actor.maxsp
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt( 81, 2, meter, src_rect)
end
def draw_mexp(actor, x, y)
actor = $game_party.actors[0]
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
bitmap = RPG::Cache.picture("Exp_Meter")
#bitmap.z = 10
if actor.level < 99
cw = bitmap.width
else
cw = bitmap.width
end
ch = bitmap.height - bitmap.height * rate
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(88 , 6, bitmap, src_rect)
end
def nada
face = RPG::Cache.picture("")
end
def draw_heroface(actor,x,y) #"Graphics/system/menu/headp/" + actor.name + ".png"
face = RPG::Cache.picture("../system/menu/HeadP/"+actor.name+"【地图】.png" ) rescue nada
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(93 , 8, face, src_rect)
end
end
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
#####################
# Window_Status_Map #
#####################
class Window_Sthero < Window_Base
def initialize
super(0, 0, 310, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.windowskin = RPG::Cache.windowskin(MOG::STMAPSKIN)
self.contents.font.bold = true
self.contents.font.size = 20
self.contents.font.name = "Georgia"
self.opacity = MOG::STMAPOPA
refresh
end
def refresh
if $game_switches[DT_SWITCH]
#actor = $game_party.actors[0]
#draw_maphp2(actor, 35, 35)
#draw_mapsp2(actor, - 40, 60)
#draw_mexp(actor, 100, 10)
#draw_heroface(actor, 0, 70) 游啊游
self.contents.clear
actor = $game_party.actors[0]
draw_maphp2(actor, 35, 35)
draw_mapsp2(actor, - 40, 60)
draw_mexp(actor, 100, 10)
draw_heroface(actor, 0, 70)
end
# draw_actor_statemap(actor, 200, 60, 70)
#draw_actor_levelmap(actor, 80, 10)
end
end
###############
# Game_Player #
###############
class Game_Player < Game_Character
attr_accessor :wref
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog11_main main
def main
@sthero = Window_Sthero.new
@sthero.x = MOG::STMAPX
@sthero.y = MOG::STMAPY
if $game_switches[MOG::STMAPVIS] == false
@sthero.visible = true
else
@sthero.visible = false
end
mog11_main
@sthero.dispose
end
alias mog11_update update
def update
mog11_update
if $game_switches[MOG::STMAPVIS] == false
@sthero.visible = true
else
@sthero.visible = false
end
if $game_switches[DT_SWITCH]
@sthero.visible = true
if $game_player.wref == true
@sthero.refresh
$game_player.wref = false
end
else
@sthero.visible = false
$game_player.wref = false
end
#if $game_switches[MOG::STMAPVIS] == false游啊游
#@sthero.visible = true
#else
#@sthero.visible = false
#end
#if $game_player.wref == true
#@sthero.refresh
#$game_player.wref = false
#end
#else
# @sthero.visible = false
#$game_player.wref = false
#end
end
end
##############
# Game_Party #
###############
class Game_Party
alias mog11_check_map_slip_damage check_map_slip_damage
def check_map_slip_damage
for actor in @actors
if actor.hp > 0 and actor.slip_damage?
$game_player.wref = true
end
end
mog11_check_map_slip_damage
end
end
###############
# Interpreter #
###############
class Interpreter
alias mog11_command_311 command_311
def command_311
mog11_command_311
$game_player.wref = true
end
alias mog11_command_312 command_312
def command_312
mog11_command_312
$game_player.wref = true
end
alias mog11_command_313 command_313
def command_313
mog11_command_313
$game_player.wref = true
end
alias mog11_command_314 command_314
def command_314
mog11_command_314
$game_player.wref = true
end
alias mog11_command_315 command_315
def command_315
mog11_command_315
$game_player.wref = true
end
end
################
# Game_Battler #
################
class Game_Battler
alias mog11_attack_effect attack_effect
def attack_effect(attacker)
mog11_attack_effect(attacker)
$game_player.wref = true
end
alias mog11_skill_effect skill_effect
def skill_effect(user, skill)
mog11_skill_effect(user, skill)
$game_player.wref = true
end
alias mog11_item_effect item_effect
def item_effect(item)
mog11_item_effect(item)
$game_player.wref = true
end
alias mog11_add_state add_state
def add_state(state_id, force = false)
mog11_add_state(state_id, force = false)
$game_player.wref = true
end
end
复制代码
素材自理
作者:
jy03037318
时间:
2008-12-22 00:14
{/ll}{/ll}那个《血条描绘》的教程我下不下来啊~!!怎么弄!??
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1