查看: 2318|回复: 9

[已经解决] 有没有一个站着时,角色做动作的脚本

[复制链接]
梦石
0
星屑
50
在线时间
64 小时
注册时间
2010-12-31
回帖
57
发表于 2015-4-24 23:20:58 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
站着不动很无趣有没有
梦石
0
星屑
90
在线时间
357 小时
注册时间
2006-3-3
回帖
163
发表于 2015-4-26 09:39:36 | 显示全部楼层
各种战斗方式都有啊。有默认竖版,有能动的横版(当然是十分耗美工的),还有大拿们搞出来的ACT的,战棋的,不知道楼主说的是什么意思。
回复

使用道具 举报

梦石
0
星屑
52
在线时间
704 小时
注册时间
2011-12-27
回帖
858
发表于 2015-4-26 10:01:10 | 显示全部楼层
這個我都在想怎樣做,哈哈
可能透過角色坐標沒改變去達成吧,晚一點能用電腦時我試試弄給你
回复

使用道具 举报

梦石
0
星屑
50
在线时间
64 小时
注册时间
2010-12-31
回帖
57
 楼主| 发表于 2015-4-26 12:22:58 | 显示全部楼层
duchen5779 发表于 2015-4-26 09:39
各种战斗方式都有啊。有默认竖版,有能动的横版(当然是十分耗美工的),还有大拿们搞出来的ACT的,战棋的 ...

在地图上站着时,角色可以蹦蹦跳跳脚本
回复

使用道具 举报

梦石
0
星屑
50
在线时间
64 小时
注册时间
2010-12-31
回帖
57
 楼主| 发表于 2015-4-26 12:23:36 | 显示全部楼层
zeldafd 发表于 2015-4-26 10:01
這個我都在想怎樣做,哈哈
可能透過角色坐標沒改變去達成吧,晚一點能用電腦時我試試弄給你 ...

恩恩,谢谢
回复

使用道具 举报

梦石
0
星屑
52
在线时间
704 小时
注册时间
2011-12-27
回帖
858
发表于 2015-4-26 15:04:56 | 显示全部楼层
你試一下這個會不會和你想要的效果相似吧
雖然只是簡單的位圖縮放, 而且我都是剛剛才下載回VX, 對RGSS2不太熟悉
但起碼可以不用額外的素材吧
希望能夠幫到你
[pre lang="ruby"]#===============================================================================
# Character Motion Stop For VX
#-------------------------------------------------------------------------------
# Author: RedSuns S.H.Chan(zeldafd@66rpg)
# Description: make the action of character more diersification
# Version: 1.0 - Beta
#===============================================================================

#===============================================================================
# Constant: ENABLE_CUSTOM_CHARACTER_ACTION
#-------------------------------------------------------------------------------
# Type: Boolean
#-------------------------------------------------------------------------------
# Description:
#   Set it to true if you want to enable this system
#===============================================================================
ENABLE_CUSTOM_CHARACTER_ACTION = true

#===============================================================================
# Class: Game_Character
#-------------------------------------------------------------------------------
# Description:
#   Define the action of the character which on the map
#===============================================================================
class Game_Character
  
#===============================================================================
# Public member: sprite
#-------------------------------------------------------------------------------
# Type: Sprite_Character
#-------------------------------------------------------------------------------
# Description:
#   Store the instance of character sprite
#===============================================================================
  attr_accessor :sprite
  
#=============================================================================
# Method: initialize(void)
#-----------------------------------------------------------------------------
# Description:
#   Initialize all public member
#-----------------------------------------------------------------------------
# return: void
#=============================================================================
  def initialize
    @id = 0
    @x = 0
    @y = 0
    @real_x = 0
    @real_y = 0
    @tile_id = 0
    @character_name = ""
    @character_index = 0
    @opacity = 255
    @blend_type = 0
    @direction = 2
    @pattern = 1
    @move_route_forcing = false
    @priority_type = 1
    @through = false
    @bush_depth = 0
    @animation_id = 0
    @balloon_id = 0
    @transparent = false
    @original_direction = 2               # Original direction
    @original_pattern = 1                 # Original pattern
    @move_type = 0                        # Movement type
    @move_speed = 4                       # Movement speed
    @move_frequency = 6                   # Movement frequency
    @move_route = nil                     # Move route
    @move_route_index = 0                 # Move route index
    @original_move_route = nil            # Original move route
    @original_move_route_index = 0        # Original move route index
    @walk_anime = true                    # Walking animation
    @step_anime = false                   # Stepping animation
    @direction_fix = false                # Fixed direction
    @anime_count = 0                      # Animation count
    @stop_count = 0                       # Stop count
    @jump_count = 0                       # Jump count
    @jump_peak = 0                        # Jump peak count
    @wait_count = 0                       # Wait count
    @locked = false                       # Locked flag
    @prelock_direction = 0                # Direction before lock
    @move_failed = false                  # Movement failed flag
    @index = 0
    @stop_action = false
  end
  
#=============================================================================
# Method: update_stop(void)
#-----------------------------------------------------------------------------
# Description:
#   Auto call while character is not jumping or moving
#-----------------------------------------------------------------------------
# return: void
#=============================================================================
  alias vx_update_stop update_stop
  def update_stop
    if ENABLE_CUSTOM_CHARACTER_ACTION
      vx_update_stop
      if ! moving? && ! jumping?
        @index += 1
        if @index > 50
          @index = 0
          if ! @stop_action
            @stop_action = true
          else
            @stop_action = false
          end
        end
        if @stop_action
          self.sprite.zoom_y = 1.09
        else
          self.sprite.zoom_y = 1
        end
      end
    else
      vx_update_stop
    end
  end
end

#===============================================================================
# Class: Spriteset_Map
#-------------------------------------------------------------------------------
# Description:
#   Define the create activity of character's sprite class instance
#===============================================================================
class Spriteset_Map
  
#=============================================================================
# Method: create_characters(void)
#-----------------------------------------------------------------------------
# Description:
#   Auto call by Spriteset_Map to create all character sprite
#-----------------------------------------------------------------------------
# return: void
#=============================================================================
  alias vx_create_characters create_characters
  def create_characters
    if ENABLE_CUSTOM_CHARACTER_ACTION
      @character_sprites = []
      for i in $game_map.events.keys.sort
        $game_map.events.sprite = Sprite_Character.new(@viewport1, $game_map.events)
        @character_sprites.push($game_map.events.sprite)
      end
      for vehicle in $game_map.vehicles
        vehicle.sprite = Sprite_Character.new(@viewport1, vehicle)
        @character_sprites.push(vehicle.sprite)
      end
      $game_player.sprite = Sprite_Character.new(@viewport1, $game_player)
      @character_sprites.push($game_player.sprite)
    else
      vx_create_chracters
    end
  end
  
end[/pre]

评分

参与人数 1星屑 +100 收起 理由
丿梁丶小柒 + 100 我很赞同

查看全部评分

回复

使用道具 举报

梦石
0
星屑
50
在线时间
64 小时
注册时间
2010-12-31
回帖
57
 楼主| 发表于 2015-4-26 18:17:41 | 显示全部楼层
zeldafd 发表于 2015-4-26 15:04
你試一下這個會不會和你想要的效果相似吧
雖然只是簡單的位圖縮放, 而且我都是剛剛才下載回VX, 對RGSS2不太 ...

可以用,又是再完美一点就好了{:2_275:}
回复

使用道具 举报

梦石
0
星屑
50
在线时间
64 小时
注册时间
2010-12-31
回帖
57
 楼主| 发表于 2015-4-26 18:18:28 | 显示全部楼层
zeldafd 发表于 2015-4-26 15:04
你試一下這個會不會和你想要的效果相似吧
雖然只是簡單的位圖縮放, 而且我都是剛剛才下載回VX, 對RGSS2不太 ...

有没有RGSS3的呢?
回复

使用道具 举报

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
回帖
6325
发表于 2015-4-28 10:26:22 | 显示全部楼层
踏步动画
回复

使用道具 举报

梦石
0
星屑
663
在线时间
750 小时
注册时间
2012-11-10
回帖
903
发表于 2015-5-3 23:49:46 | 显示全部楼层
有本事就来阻止我啊,主体单元『天照』!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部