Project1
标题:
请达人讲解一下这个脚本
[打印本页]
作者:
icogogogo
时间:
2008-7-3 18:22
标题:
请达人讲解一下这个脚本
module MOG_VX02
#Definição da switch que ativa o efeito Wave.
BB_WAVE_SWITCH = 0
#Definição da switch que ativa a versão VX.
BB_VXEDITION_SWITCH = 0
end
#-------------------------------------------------
$mogscript = {} if $mogscript == nil
$mogscript["battleback_xp"] = true
#-------------------------------------------------
###############
# Game_System #
###############
class Game_System
attr_accessor :bb
alias mog_vx02_initialize initialize
def initialize
mog_vx02_initialize
@bb = ""
end
end
###############
# Module Cache #
###############
module Cache
def self.battleback(filename)
load_bitmap("Graphics/battlebacks/", filename)
end
end
#################
# Spriteset_Battle #
#################
class Spriteset_Battle
include MOG_VX02
def create_battleback
@battleback_sprite = Sprite.new(@viewport1)
source = Cache.battleback($game_system.bb.to_s) rescue empty
if $game_switches[BB_WAVE_SWITCH] == true
bitmap = Bitmap.new(640, 480)
else
bitmap = Bitmap.new(544, 288)
end
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.radial_blur(90, 12) if $game_switches[BB_VXEDITION_SWITCH] == true
@battleback_sprite.bitmap = bitmap
wave_on if $game_switches[BB_WAVE_SWITCH] == true
end
def wave_on
@battleback_sprite.ox = 320
@battleback_sprite.oy = 240
@battleback_sprite.x = 272
@battleback_sprite.y = 176
@battleback_sprite.wave_amp = 8
@battleback_sprite.wave_length = 240
@battleback_sprite.wave_speed = 120
end
def empty
@battleback_sprite.bitmap = $game_temp.background_bitmap
end
def create_battlefloor
if $game_switches[BB_VXEDITION_SWITCH] == true
@battlefloor_sprite = Sprite.new(@viewport1)
@battlefloor_sprite.bitmap = Cache.system("BattleFloor")
@battlefloor_sprite.x = 0
@battlefloor_sprite.y = 192
@battlefloor_sprite.z = 1
@battlefloor_sprite.opacity = 128
else
@battlefloor_sprite = Sprite.new(@viewport1)
end
end
end
复制代码
已知是战斗背景的脚本,在事件中输入“ $game_system.bb = "023-FarmVillage01" ”
可以将战斗背景给改为023-FarmVillage01等
我想问的是:在这个脚本中可不可以在事件中临时调用当前地图作为战斗背景
也就是说,我想在一般杂鱼中用当前地图或者VX眩晕效果做背景
特殊战斗用XP的战斗背景图片
谢谢~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1