Project1
标题:
如何制作像仙剑4那样多命令的窗口
[打印本页]
作者:
zxc3824
时间:
2011-8-4 22:02
标题:
如何制作像仙剑4那样多命令的窗口
仙剑4不少人玩过,废话我就不说了,我提供一个脚本,希望大家能够利用该脚本做个类似于标题菜单那样的菜单,我有个工程,除了基本的三个命令以外,还有一个游戏讯息的命令
看图吧
QQ截图20110804215858.jpg
(82.18 KB, 下载次数: 7)
下载附件
保存到相册
2011-8-4 21:58 上传
而我想进去后希望再弄个类似于这个标题菜单的菜单,但是只有一个命令,怕要求难,把素材打包上来吧
Titles.zip
(374.47 KB, 下载次数: 100)
2011-8-4 22:00 上传
点击文件名下载附件
这是脚本
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# ■ 图片标题菜单1.0
# Scene_Title
#------------------------------------------------------------------------------
# 作者:chaochao
# http://zhuchao.go1.icpcn.com
#==============================================================================
class Scene_Title
def main
if $BTEST
battle_test
return
end
$data_mapinfos = load_data("Data/MapInfos.rxdata")
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# 生成标题图形
@sprite = [Sprite.new]
for i in 0..8
@sprite[i] = Sprite.new
@sprite[i].opacity = 0
end
@sprite[0].bitmap = RPG::Cache.title($data_system.title_name)
@sprite[0].opacity = 0
#开始游戏的图片
@sprite[1].bitmap = Bitmap.new("Graphics/Titles/新的开始-2.png")
@sprite[2].bitmap = Bitmap.new("Graphics/Titles/新的开始-1.png")
#继续游戏的图片
@sprite[3].bitmap = Bitmap.new("Graphics/Titles/旧的回忆-2.png")
@sprite[4].bitmap = Bitmap.new("Graphics/Titles/旧的回忆-1.png")
#结束游戏的图片
@sprite[5].bitmap = Bitmap.new("Graphics/Titles/离开游戏-2.png")
@sprite[6].bitmap = Bitmap.new("Graphics/Titles/离开游戏-1.png")
#游戏讯息的图片
@sprite[7].bitmap = Bitmap.new("Graphics/Titles/游戏讯息-2.png")
@sprite[8].bitmap = Bitmap.new("Graphics/Titles/游戏讯息-1.png")
#图片位置
for i in 1..8
case i
when 1
x=0
y=240
@sprite[i].x =x
@sprite[i].y =y
when 2
x=0
y=240
@sprite[i].x =x
@sprite[i].y =y
when 3
x=0
y=360
@sprite[i].x =x
@sprite[i].y =y
when 4
x=0
y=360
@sprite[i].x =x
@sprite[i].y =y
when 5
x=0
y=420
@sprite[i].x =x
@sprite[i].y =y
when 6
x=0
y=420
@sprite[i].x =x
@sprite[i].y =y
when 7
x=427
y=40
@sprite[i].x =x
@sprite[i].y =y
when 8
x=427
y=40
@sprite[i].x =x
@sprite[i].y =y
end
end
@continue_enabled = false
for i in 0..35
if FileTest.exist?("Save#{i}.rxdata")
@continue_enabled = true
end
end
if @continue_enabled
@command_index = 1
else
@command_index = 0
#@sprite[3].tone = Tone.new(0, 0, 0, 255)
# @sprite[4].tone = Tone.new(0, 0, 0, 255)
end
$game_system.bgm_play($data_system.title_bgm)
Audio.me_stop
Audio.bgs_stop
Graphics.transition
loop do
Graphics.update
#淡出背景圖形
if @sprite[0].opacity <= 255
@sprite[0].opacity += 15
end
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
# 釋放圖形
for i in 0..8
@sprite[i].bitmap.dispose
@sprite[i].dispose
end
end
def update
chaochaocommandchaochao
if Input.trigger?(Input::C)
case @command_index
when 0
command_new_game
when 1
command_continue
when 2
command_shutdown
when 3
command_yxxx
end
end
end
def chaochaocommandchaochao
if Input.trigger?(Input::UP)
@command_index -= 1
if @command_index < 0
@command_index = 3
end
$game_system.se_play($data_system.cursor_se)
end
if Input.trigger?(Input::DOWN)
@command_index += 1
if @command_index > 3
@command_index = 0
end
$game_system.se_play($data_system.cursor_se)
end
#修改………………
mouse_x, mouse_y = Mouse.get_mouse_pos
if (mouse_x>53) and (mouse_x<147)and(mouse_y>307)and(mouse_y<342)
if @command_index != 0
$game_system.se_play($data_system.cursor_se)
end
@command_index = 0
end
if (mouse_x>41) and (mouse_x<135)and(mouse_y>384)and(mouse_y<418)
if @command_index != 1
$game_system.se_play($data_system.cursor_se)
end
@command_index = 1
end
if (mouse_x>91) and (mouse_x<186)and(mouse_y>444)and(mouse_y<477)
if @command_index != 2
$game_system.se_play($data_system.cursor_se)
end
@command_index = 2
end
if (mouse_x>535) and (mouse_x<630)and(mouse_y>39)and(mouse_y<78)
if @command_index != 3
$game_system.se_play($data_system.cursor_se)
end
@command_index = 3
end
#--------------------------------------------------------------------------
# ● 命令 : 游戏讯息
#--------------------------------------------------------------------------
def command_yxxx
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 切换到游戏讯息画面
$scene = Scene_Yxxx.new
end
#修改………………
case @command_index
when 0
if @sprite[1].opacity >= 0
@sprite[1].opacity -= 30
end
if @sprite[2].opacity <= 240
@sprite[2].opacity += 30
end
if @sprite[3].opacity <= 210
@sprite[3].opacity += 30
end
if @sprite[4].opacity >= 0
@sprite[4].opacity -= 30
end
if @sprite[5].opacity <= 210
@sprite[5].opacity += 30
end
if @sprite[6].opacity >= 0
@sprite[6].opacity -= 30
end
if @sprite[7].opacity <= 210
@sprite[7].opacity += 30
end
if @sprite[8].opacity >= 0
@sprite[8].opacity -= 30
end
when 1
if @sprite[1].opacity <= 210
@sprite[1].opacity += 30
end
if @sprite[2].opacity >= 0
@sprite[2].opacity -= 30
end
if @sprite[3].opacity >= 0
@sprite[3].opacity -= 30
end
if @sprite[4].opacity <= 240
@sprite[4].opacity += 30
end
if @sprite[5].opacity <= 210
@sprite[5].opacity += 30
end
if @sprite[6].opacity >= 0
@sprite[6].opacity -= 30
end
if @sprite[7].opacity <= 210
@sprite[7].opacity += 30
end
if @sprite[8].opacity >= 0
@sprite[8].opacity -= 30
end
when 2
if @sprite[1].opacity <= 210
@sprite[1].opacity += 30
end
if @sprite[2].opacity >= 0
@sprite[2].opacity -= 30
end
if @sprite[3].opacity <= 210
@sprite[3].opacity += 30
end
if @sprite[4].opacity >= 0
@sprite[4].opacity -= 30
end
if @sprite[5].opacity >= 0
@sprite[5].opacity -= 30
end
if @sprite[6].opacity <= 240
@sprite[6].opacity += 30
end
if @sprite[7].opacity <= 210
@sprite[7].opacity += 30
end
if @sprite[8].opacity >= 0
@sprite[8].opacity -= 30
end
when 3
if @sprite[1].opacity <= 210
@sprite[1].opacity += 30
end
if @sprite[2].opacity >= 0
@sprite[2].opacity -= 30
end
if @sprite[3].opacity <= 210
@sprite[3].opacity += 30
end
if @sprite[4].opacity >= 0
@sprite[4].opacity -= 30
end
if @sprite[5].opacity >= 210
@sprite[5].opacity += 30
end
if @sprite[6].opacity >= 0
@sprite[6].opacity -= 30
end
if @sprite[7].opacity >= 0
@sprite[7].opacity -= 30
end
if @sprite[8].opacity <= 240
@sprite[8].opacity += 30
end
end
end
end
复制代码
我自己照着这个脚本做个了另一个菜单,不过不管用
希望有高手做个想这个标题脚本那样的单个命令的菜单 dsu_plus_rewardpost_czw
作者:
海老三
时间:
2011-8-4 23:51
{:2_30:}图片标题菜单?
兰州可以说清楚点么?什么叫单个命令?
作者:
2719358
时间:
2011-8-5 06:35
http://rpg.blue/forum.php?mod=vi ... 7%E4%BE%A0%E4%BC%A0
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1