赞 | 93 |
VIP | 0 |
好人卡 | 13 |
积分 | 80 |
经验 | 53314 |
最后登录 | 2024-8-13 |
在线时间 | 1183 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7981
- 在线时间
- 1183 小时
- 注册时间
- 2007-7-29
- 帖子
- 2055
|
游戏没做完,看到VX的动画不错,就偷来XP用,看到柳大这脚本,改了下,变成VX能够去XP,缺点是只能用一张图片。
用法完全一样,只是版本对调。
- #---------------------------------------------------------------------------
- # ■ VX动画导入脚本
- # -确定复制好的文件都在。
- # -将脚本插入,然后运行游戏。
- #---------------------------------------------------------------------------
- module RPG
- class Animation2
- def initialize
- @id = 0
- @name = ""
- @animation1_name = ""
- @animation1_hue = 0
- @animation2_name = ""
- @animation2_hue = 0
- @position = 1
- @frame_max = 1
- @frames = [RPG::Animation::Frame.new]
- @timings = []
- end
- attr_accessor :id
- attr_accessor :name
- attr_accessor :animation1_name
- attr_accessor :animation1_hue
- attr_accessor :animation2_name
- attr_accessor :animation2_hue
- attr_accessor :position
- attr_accessor :frame_max
- attr_accessor :frames
- attr_accessor :timings
- end
- end
- module RPG
- class Animation2
- class Timing
- def initialize
- @frame = 0
- @flash_scope = 0
- @flash_color = Color.new(255,255,255,255)
- @flash_duration = 5
- @condition = 0
- @se = RPG::AudioFile.new("", 80)
- @se_name = ""
- @se_volume = 100
- @se_pitch = 100
- end
- attr_accessor :frame
- attr_accessor :se
- attr_accessor :se_name
- attr_accessor :se_volume
- attr_accessor :se_pitch
- attr_accessor :flash_scope
- attr_accessor :flash_color
- attr_accessor :flash_duration
- attr_accessor :condition
- end
- end
- end
- $data_animations_xpvx = load_data("animations2.vx_to_xp")
- $data_animations = load_data("Data/Animations.rxdata")
- for ani in $data_animations_xpvx
- new_ani = RPG::Animation.new
- new_ani.id = ani.id
- new_ani.name = ani.name
- new_ani.animation_name = ani.animation1_name
- new_ani.animation_hue = ani.animation1_hue
- new_ani.position = ani.position
- new_ani.frame_max = ani.frame_max
- new_ani.frames = ani.frames
- for timings in ani.timings
- temp_timings = RPG::Animation::Timing.new
- temp_timings.frame = timings.frame
- temp_timings.se = RPG::AudioFile.new(timings.se_name, timings.se_volume, timings.se_pitch)
- temp_timings.flash_scope = timings.flash_scope
- temp_timings.flash_color = timings.flash_color
- temp_timings.flash_duration = timings.flash_duration
- new_ani.timings.push(temp_timings)
- end
- $data_animations.push(new_ani)
- end
- save_data($data_animations, "Data/Animations.rxdata")
- p "已经导入完毕,愿你成功。"
- exit
复制代码 |
|