Project1
标题:
请问行走图怎么排
[打印本页]
作者:
星雨空也
时间:
2012-7-21 20:22
标题:
请问行走图怎么排
6R下了好多张RO行走图,每一张都是一个人物4*4的,VA要3*4的,只好删掉一组,但是在地图上显示时,人物又比地图高出很多,于是又该成96*32*3*4的图,但走起来一跳一跳的,啊~~~~~我要疯了,折腾了一个下午,电脑都要烧了,哪位大大有什么简便方法或者窍门么?
作者:
铅笔描绘的思念
时间:
2012-7-21 21:51
本帖最后由 铅笔描绘的思念 于 2012-7-23 13:41 编辑
httXP的行走图也是4x4的所以
#########################
# XP 行走图显示法 v1.0 #
# #
# BY 诡异の猫 #
#########################
class Game_Character
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
alias old_ini initialize
def initialize
old_ini
@original_pattern = 2
end
#--------------------------------------------------------------------------
# ● 矫正姿势
#--------------------------------------------------------------------------
def straighten
@pattern = 2 if @walk_anime or @step_anime
@anime_count = 0
end
end
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# ● 更新传送源的位图
#--------------------------------------------------------------------------
def update_bitmap
if @tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_index != @character.character_index
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_index = @character.character_index
if @tile_id > 0
sx = (@tile_id / 128 % 2 * 8 + @tile_id % 8) * 32;
sy = @tile_id % 256 / 8 % 16 * 32;
self.bitmap = tileset_bitmap(@tile_id)
self.src_rect.set(sx, sy, 32, 32)
self.ox = 16
self.oy = 32
else
self.bitmap = Cache.character(@character_name)
sign = @character_name[/^[\!\$]./]
if sign != nil and sign.include?(')
@cw = bitmap.width / 4
@ch = bitmap.height / 4
else
@cw = bitmap.width / 16
@ch = bitmap.height / 8
end
self.ox = @cw / 2
self.oy = @ch
end
end
end
#--------------------------------------------------------------------------
# ● 更新传送源矩形
#--------------------------------------------------------------------------
def update_src_rect
if @tile_id == 0
index = @character.character_index
pattern = @character.pattern < 4 ? @character.pattern : 1
sx = (index % 4 * 4 + pattern) * @cw
sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end
end
复制代码
作者:
星雨空也
时间:
2012-7-24 23:44
谢谢铅笔君,现在已经好了,不管他了
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1