Project1
标题:
怎么实现这样的战斗画面,求那位大侠教教
[打印本页]
作者:
bze9399
时间:
2009-2-8 22:44
提示:
作者被禁止或删除 内容自动屏蔽
作者:
蒦們
时间:
2009-2-8 22:46
arpg?
作者:
bze9399
时间:
2009-2-8 22:47
提示:
作者被禁止或删除 内容自动屏蔽
作者:
蒦們
时间:
2009-2-8 22:48
即时性动作游戏= =
作者:
bze9399
时间:
2009-2-8 22:51
提示:
作者被禁止或删除 内容自动屏蔽
作者:
蒦們
时间:
2009-2-8 22:52
这里有个范例,下载看看吧= =
http://rpg.blue/web/htm/news812.htm
作者:
bze9399
时间:
2009-2-8 22:59
提示:
作者被禁止或删除 内容自动屏蔽
作者:
clap_pl
时间:
2009-2-9 01:43
实现
在行走状态下 显示血条么?
以前有个显示人物坐标的脚本
在那个基础上可以改出这个
-。-
我是这样做出这种效果的
也想不出什么再好的办法了-。-
#==========================================================================
# 本脚本来自http://rpg.blue/web/htm/,用于任何游戏请保留此信息。别以为加密就可以del哦
#==========================================================================
XY_SWITCH = 25
$upPL = false # 当25号开关打开,本脚本才开始工作。
#==============================================================================
# ■ Window_XY
#------------------------------------------------------------------------------
# 显示坐标的窗口。
#==============================================================================
class Window_xy < Window_Base#注意前面那个window_xy是文件名
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 400, 640, 100)#最后面那个数字是宽要显示多个需要改大,前面一个是长~
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 0 # 这个是背景透明
self.opacity = 0 # 这个是边框和背景都透明
self.contents_opacity = 255 # 这个是内容透明
self.visible = false
self.z = 11
refresh
@x = $game_player.x
@y = $game_player.y
@id = $game_map.map_id
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if $game_switches[XY_SWITCH] #确定开关是否打开,可以自己改变开关
@x = $game_player.x #获取角色X坐标
@y = $game_player.y #获取角色Y坐标
@id = $game_map.map_id #获取地图编号
self.contents.clear #清除以前的东西
############################
#draw_beijing
end
end
#--------------------------------------------------------------------------
# ● 判断文字刷新。节约内存用
#--------------------------------------------------------------------------
def judge
return true if @x != $game_player.x
return true if @y != $game_player.y
return true if @id != $game_map.map_id
return false
end
end
#################################
class Window_blue < Window_Base#注意前面那个window_xy是文件名
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(-100, 400, 800, 100)#最后面那个数字是宽要显示多个需要改大,前面一个是长~
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 0 # 这个是背景透明
self.opacity = 0 # 这个是边框和背景都透明
self.contents_opacity = 255 # 这个是内容透明
self.visible = false
self.z = 10
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@switch = $game_switches[XY_SWITCH]
@switch2 = $game_switches[199]
@switch3 = $game_switches[198]
if $game_switches[XY_SWITCH] #确定开关是否打开,可以自己改变开关
white = Color.new(0,21,120,120)
#white = Color.new(255,255,255,225)
self.contents.fill_rect(0,0,800,30,white)#############PL修改
if $game_switches[199]
bitmap=Bitmap.new("Graphics/pictures/smdmp")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(608, -7, bitmap, src_rect)
end
if $game_switches[198]
bitmap=Bitmap.new("Graphics/pictures/smpr")
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
self.contents.blt(600+43, -5, bitmap, src_rect)
#self.contents.blt(600+41+37, -5, bitmap, src_rect)
end
end
end
#--------------------------------------------------------------------------
# ● 判断文字刷新。节约内存用
#--------------------------------------------------------------------------
def judge
if @switch != $game_switches[XY_SWITCH]or @switch2 != $game_switches[199] or @switch3 != $game_switches[198]
return true
else return false
end
end
end
###########################################################################
# 下面的东西不需要掌握~ #
###########################################################################
class Scene_Map
alias xy_66rpg_main main
def main
@move_window = Window_mover.new
@move_windowback = Window_blue.new
#@move_window = Window_mover.new#######################PL修改
#####################33
#####################33
xy_66rpg_main
@move_windowback.dispose########################PL修改
@move_window.dispose########################PL修改
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
alias xy_66rpg_update update
def update
xy_66rpg_update
if $game_switches[XY_SWITCH]
@move_window.visible = true
@move_windowback.visible = true
@move_window.refresh if @move_window.judge or @move_windowback.judge
@move_windowback.refresh if @move_windowback.judge
#p 1 if @move_windowback.judge
else
@move_window.visible = false#############
@move_windowback.visible = false
end
if $upPL != $game_switches[XY_SWITCH]
$upPL = $game_switches[XY_SWITCH]
end
#@move_window. = false########################PL修改
end
end
#==========================================================================
# 本脚本来自http://rpg.blue/web/htm/,用于任何游戏请保留此信息。别以为加密就可以del哦
#==========================================================================
XY_SWITCH = 25
###################PL修改
class Window_mover < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(-15, 385, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0 #使透明
refresh
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@actornum = $game_party.actors.size
if $game_switches[XY_SWITCH]
atnum = $game_party.actors.size
@actornum = atnum
for i in 0...atnum
actor = $game_party.actors[i]
draw_actor_hp(actor, 46+ 130* i, 0, 90, 99, 35, 5)#血槽
draw_actor_sp(actor, 46+ 130* i, 9, 90, 99, 35, 5)#SP槽
draw_actor_cp(actor, 46+ 130* i, 18, 90, 99, 35, 5)#CP槽
end
for i in 0...$game_party.actors.size
mover = $game_party.actors[i]
x = 9+ i * 130
y = 17
case mover.id
when 1
bitmap = Bitmap.new("Graphics/FACES/1")
when 9
bitmap = Bitmap.new("Graphics/FACES/9")
when 10
bitmap = Bitmap.new("Graphics/FACES/10")
when 13
bitmap = Bitmap.new("Graphics/FACES/13")
end
src_rect = Rect.new(0,0,100,60)
self.contents.blt(x,y,bitmap,src_rect)
end
end
end
#####################################3
######################################
def judge
return true if @actornum != $game_party.actors.size
end
################################################
###############################################
end
复制代码
作者:
redant
时间:
2009-2-9 09:16
#_______________________________________________________________________________
# 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( 20, 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( 66 ,16 , meter, src_rect)
end
def draw_mapsp2(actor, x, y)
meter = RPG::Cache.picture("SP_Meter")
cw = meter.width * actor.sp / actor.maxsp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt( 66, 29, 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")
if actor.level < 99
cw = bitmap.width * rate
else
cw = bitmap.width
end
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(66 , 3, bitmap, src_rect)
end
def nada
face = RPG::Cache.picture("")
end
def draw_heroface(actor,x,y)
face = RPG::Cache.picture(actor.name + "_face") rescue nada
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(23 , 2, 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
self.contents.clear
actor = $game_party.actors[0]
draw_maphp2(actor, 35, 35)
draw_mapsp2(actor, - 40, 60)
draw_heroface(actor, 0, 70)
# draw_actor_statemap(actor, 200, 60, 70)
# draw_actor_levelmap(actor, 80, 10)
draw_mexp(actor, 100, 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
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
mog11_update
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
复制代码
素材自己找 这是一个地图显示血条魔法经验和头像的脚本 [LINE]1,#dddddd[/LINE]
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1