Project1
标题: RPGVX請問,地圖隨機戰鬥全滅 [打印本页]
作者: sakazaki 时间: 2013-2-24 14:42
标题: RPGVX請問,地圖隨機戰鬥全滅
本帖最后由 sakazaki 于 2013-2-24 20:32 编辑
RPGVX請問,地圖隨機戰鬥全滅不跳到GAMEOVER
兒是開啟一個開關或是事件,
讓後續劇情有進展比方說動畫主角暈倒然後爬起來之類的
Scene_Battle底下191-215行
#--------------------------------------------------------------------------
# * 結束作戰
# result : 作戰結果 (0: 得勝, 1: 撤退, 2: 我方全滅)
#--------------------------------------------------------------------------
def battle_end(result)
if result == 2 and not $game_troop.can_lose
call_gameover
else
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
end
$game_temp.in_battle = false
end
#--------------------------------------------------------------------------
# * 結束作戰
# result : 作戰結果 (0: 得勝, 1: 撤退, 2: 我方全滅)
#--------------------------------------------------------------------------
def battle_end(result)
if result == 2 and not $game_troop.can_lose
call_gameover
else
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
end
$game_temp.in_battle = false
end
********************************************************
Game_Party底下256-264行
#--------------------------------------------------------------------------
# * 隊伍全滅判定
#--------------------------------------------------------------------------
def all_dead?
if @actors.size == 0 and not $game_temp.in_battle
return false
end
return existing_members.empty?
end
#--------------------------------------------------------------------------
# * 隊伍全滅判定
#--------------------------------------------------------------------------
def all_dead?
if @actors.size == 0 and not $game_temp.in_battle
return false
end
return existing_members.empty?
end
請問該改哪邊?怎麼改?
懇請各位前輩賜教!!
請問??像這樣對吧??抱歉超新手多多冒犯
作者: 怪蜀黍 时间: 2013-2-27 20:07
本帖最后由 protosssonny 于 2013-2-27 20:10 编辑
没有人答就P叔来吧
#--------------------------------------------------------------------------
# ● 结束战斗
# result : 结果(0:胜利,1:逃跑,2:失败)
#--------------------------------------------------------------------------
def battle_end(result)
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
$game_temp.common_event_id = 2 if result == 2 #第一个等号后面,需要全灭后调用几号公共事件就写几,后面的一律写2
$game_temp.in_battle = false
end
#--------------------------------------------------------------------------
# ● 结束战斗
# result : 结果(0:胜利,1:逃跑,2:失败)
#--------------------------------------------------------------------------
def battle_end(result)
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
$game_temp.common_event_id = 2 if result == 2 #第一个等号后面,需要全灭后调用几号公共事件就写几,后面的一律写2
$game_temp.in_battle = false
end
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |