赞 | 273 |
VIP | 0 |
好人卡 | 0 |
积分 | 155 |
经验 | 515 |
最后登录 | 2024-3-24 |
在线时间 | 2086 小时 |
Lv4.逐梦者
- 梦石
- 1
- 星屑
- 14500
- 在线时间
- 2086 小时
- 注册时间
- 2017-9-28
- 帖子
- 662
|
发表于 2019-11-22 18:04:13
|
显示全部楼层
试试?
- #===============================================================================
- # * [ACE] 自定义偏移
- #===============================================================================
- # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
- # * Version: 1.1
- # * Updated: 09/06/2016
- # * Requires: -------
- #-------------------------------------------------------------------------------
- # * < Change Log >
- #-------------------------------------------------------------------------------
- # * Version 1.0 (25/02/2016)
- # - Initial release.
- # * Version 1.1 (09/06/2016)
- # - Added compatibility with my Action Notification Popups script.
- #-------------------------------------------------------------------------------
- # * < Description >
- #-------------------------------------------------------------------------------
- # * 可以让你随意修正行走图图像的位置.
- # * 不会改变事件的实际位置,改变的只是图像!
- #-------------------------------------------------------------------------------
- # * < Installation >
- #-------------------------------------------------------------------------------
- # * Place this script below Materials but above Main!
- #-------------------------------------------------------------------------------
- # * < Compatibility Info >
- #-------------------------------------------------------------------------------
- # * No known incompatibilities.
- #-------------------------------------------------------------------------------
- # * < Known Issues >
- #-------------------------------------------------------------------------------
- # * No known issues.
- #-------------------------------------------------------------------------------
- # * < Terms of Use >
- #-------------------------------------------------------------------------------
- # * Free to use for whatever purposes you want.
- # * Credit me (Sixth) in your game, pretty please! :P
- # * Posting modified versions of this script is allowed as long as you notice me
- # about it with a link to it!
- #===============================================================================
- $imported = {} if $imported.nil?
- $imported["SixthCustomOffsets"] = true
- #===============================================================================
- # Settings:
- #===============================================================================
- module CustomOffsets
- #-----------------------------------------------------------------------------
- # 偏移设定:
- #-----------------------------------------------------------------------------
- # 因为角色精灵可以在游戏中随时更改,我发现最好使偏移设置取决于所使用的图像,而不
- # 是从备注或事件注释中读取。
- # 这样,即使你在游戏过程中改变角色的行走图,偏移量也是正确的,你很可能会做更多
- # 或更少的事情。B
- #
- # 格式:
- #
- # "行走图文件名" => {
- # 2 => [x偏移量,y偏移量], # 行走图朝向下时的偏移
- # 4 => [x偏移量,y偏移量], # 行走图朝向左时的偏移
- # 6 => [x偏移量,y偏移量], # 行走图朝向右时的偏移
- # 8 => [x偏移量,y偏移量], # 行走图朝向上时的偏移
- # },
- #
- # 因此,请使用图像的文件名作为设置的名称。
- # 你可以为所有方向情况设置不同的偏移量。
- # 有时你想将精灵向上移动2个像素,但仅当事件面向左侧时才会移动,例如。
- # 嗯,你现在可以这样做。
- #
- # 将X偏移设置为正数将使图像向右移动,而负设置将使其向左移动。
- # 将Y偏移设置为正数将使图像向下移动,而负设置将使其向上移动。
- #
- # 确保输入所有方向的设置!
- # 如果您只想为一个方向设置偏移量,例如,按照您想要的方式设置一个偏移量,
- # 并将其余部分设置为[0,0]。
- #
- # 没有设置的图片在游戏中不会有任何偏移,他们会使用默认位置!
- #-----------------------------------------------------------------------------
- Offsets = {
- "$swordblade" => {
- # 下 左 右 上
- 2 => [0,0], 4 => [0,40], 6 => [0,40], 8 => [0,0],
- },
- "$Larve" => {
- 2 => [0,18], 4 => [0,18], 6 => [0,18], 8 => [0,18],
- },
- # 自己手动添加更多!
- }
-
- end
- #===============================================================================
- # End of settings! Editing anything below may lead to... you know it, right? o.o
- #===============================================================================
- class Sprite_Character < Sprite_Base
-
- alias set_offsets7643 set_character_bitmap
- def set_character_bitmap
- set_offsets7643
- @off_dir = 0
- @notif_offset = [0,0]
- end
- alias add_offsets9975 update
- def update
- add_offsets9975
- if @off_dir != @character.direction
- if CustomOffsets::Offsets.include?(@character.character_name)
- off = CustomOffsets::Offsets[@character.character_name][@character.direction]
- @notif_offset = off
- self.ox = @cw / 2 - off[0] if @cw
- self.oy = @ch - off[1] if @ch
- end
- @off_dir = @character.direction
- end
- end
-
- end
- #==============================================================================
- # !!END OF SCRIPT - OHH, NOES!!
- #==============================================================================
复制代码 |
评分
-
查看全部评分
|