Project1
标题:
关于小地图显示的随时切换
[打印本页]
作者:
幻耶
时间:
2008-4-27 00:04
标题:
关于小地图显示的随时切换
在游戏中按SHIFTT随时打开关闭小地图,不要用事件做的话,怎么实现
小地图脚本
http://rpg.blue/web/htm/news294.htm [LINE]1,#dddddd[/LINE]
版务信息:本贴由楼主自主结贴~
作者:
水迭澜
时间:
2008-4-27 00:48
我记得脚本开头有说明……
作者:
3535
时间:
2008-4-27 02:15
Scene_Map
#--------------------------------------------------------------------------
# ● 更新画面
#--------------------------------------------------------------------------
def update
# 循环
loop do
# 按照地图、实例、主角的顺序更新
# (这个更新顺序不会在的满足事件的执行条件下成为给予角色瞬间移动
# 的机会的重要因素)
$game_map.update
$game_system.map_interpreter.update
$game_player.update
# 系统 (定时器)、画面更新
$game_system.update
$game_screen.update
# 如果主角在场所移动中就中断循环
unless $game_temp.player_transferring
break
end
# 执行场所移动
transfer_player
# 处理过渡中的情况下、中断循环
if $game_temp.transition_processing
break
end
end
if Input.press?(Input::SHIFT)
if $game_system.minimap_visible == true
$game_system.minimap_visible = false
else
$game_system.minimap_visible = true
end
end
# 更新活动区块
@spriteset.update
# 更新讯息窗口
@message_window.update
# 游戏结束的情况下
if $game_temp.gameover
# 切换的游戏结束画面
$scene = Scene_Gameover.new
return
end
# 返回标题画面的情况下
if $game_temp.to_title
# 切换到标题画面
$scene = Scene_Title.new
return
end
# 处理过渡中的情况下
if $game_temp.transition_processing
# 清除过渡处理中标志
$game_temp.transition_processing = false
# 执行过渡
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# 显示讯息窗口中的情况下
if $game_temp.message_window_showing
return
end
# 遇敌计数为 0 且、且遇敌清单不为空白的情况下
if $game_player.encounter_count == 0 and $game_map.encounter_list != []
# 不是在事件执行中或者禁止遇敌中
unless $game_system.map_interpreter.running? or
$game_system.encounter_disabled
# 确定队伍
n = rand($game_map.encounter_list.size)
troop_id = $game_map.encounter_list[n]
# 队伍有效的话
if $data_troops[troop_id] != nil
# 设定呼叫战斗标志
$game_temp.battle_calling = true
$game_temp.battle_troop_id = troop_id
$game_temp.battle_can_escape = true
$game_temp.battle_can_lose = false
$game_temp.battle_proc = nil
end
end
end
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 不是在事件执行中或选单禁止中
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
# 设定选单呼叫标志以及 SE 演奏
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
# 侦错模式为 ON 并且按下 F9 键的情况下
if $DEBUG and Input.press?(Input::F9)
# 设定呼叫侦错标志
$game_temp.debug_calling = true
end
# 不在主角移动中的情况下
unless $game_player.moving?
# 执行各种画面的呼叫
if $game_temp.battle_calling
call_battle
elsif $game_temp.shop_calling
call_shop
elsif $game_temp.name_calling
call_name
elsif $game_temp.menu_calling
call_menu
elsif $game_temp.save_calling
call_save
elsif $game_temp.debug_calling
call_debug
end
end
end
复制代码
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1