查看: 2367|回复: 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不太熟悉
但起碼可以不用額外的素材吧
希望能夠幫到你
  1. #===============================================================================
  2. # Character Motion Stop For VX
  3. #-------------------------------------------------------------------------------
  4. # Author: RedSuns S.H.Chan(zeldafd@66rpg)
  5. # Description: make the action of character more diersification
  6. # Version: 1.0 - Beta
  7. #===============================================================================

  8. #===============================================================================
  9. # Constant: ENABLE_CUSTOM_CHARACTER_ACTION
  10. #-------------------------------------------------------------------------------
  11. # Type: Boolean
  12. #-------------------------------------------------------------------------------
  13. # Description:
  14. #   Set it to true if you want to enable this system
  15. #===============================================================================
  16. ENABLE_CUSTOM_CHARACTER_ACTION = true

  17. #===============================================================================
  18. # Class: Game_Character
  19. #-------------------------------------------------------------------------------
  20. # Description:
  21. #   Define the action of the character which on the map
  22. #===============================================================================
  23. class Game_Character
  24.   
  25. #===============================================================================
  26. # Public member: sprite
  27. #-------------------------------------------------------------------------------
  28. # Type: Sprite_Character
  29. #-------------------------------------------------------------------------------
  30. # Description:
  31. #   Store the instance of character sprite
  32. #===============================================================================
  33.   attr_accessor :sprite
  34.   
  35. #=============================================================================
  36. # Method: initialize(void)
  37. #-----------------------------------------------------------------------------
  38. # Description:
  39. #   Initialize all public member
  40. #-----------------------------------------------------------------------------
  41. # return: void
  42. #=============================================================================
  43.   def initialize
  44.     @id = 0
  45.     @x = 0
  46.     @y = 0
  47.     @real_x = 0
  48.     @real_y = 0
  49.     @tile_id = 0
  50.     @character_name = ""
  51.     @character_index = 0
  52.     @opacity = 255
  53.     @blend_type = 0
  54.     @direction = 2
  55.     @pattern = 1
  56.     @move_route_forcing = false
  57.     @priority_type = 1
  58.     @through = false
  59.     @bush_depth = 0
  60.     @animation_id = 0
  61.     @balloon_id = 0
  62.     @transparent = false
  63.     @original_direction = 2               # Original direction
  64.     @original_pattern = 1                 # Original pattern
  65.     @move_type = 0                        # Movement type
  66.     @move_speed = 4                       # Movement speed
  67.     @move_frequency = 6                   # Movement frequency
  68.     @move_route = nil                     # Move route
  69.     @move_route_index = 0                 # Move route index
  70.     @original_move_route = nil            # Original move route
  71.     @original_move_route_index = 0        # Original move route index
  72.     @walk_anime = true                    # Walking animation
  73.     @step_anime = false                   # Stepping animation
  74.     @direction_fix = false                # Fixed direction
  75.     @anime_count = 0                      # Animation count
  76.     @stop_count = 0                       # Stop count
  77.     @jump_count = 0                       # Jump count
  78.     @jump_peak = 0                        # Jump peak count
  79.     @wait_count = 0                       # Wait count
  80.     @locked = false                       # Locked flag
  81.     @prelock_direction = 0                # Direction before lock
  82.     @move_failed = false                  # Movement failed flag
  83.     @index = 0
  84.     @stop_action = false
  85.   end
  86.   
  87. #=============================================================================
  88. # Method: update_stop(void)
  89. #-----------------------------------------------------------------------------
  90. # Description:
  91. #   Auto call while character is not jumping or moving
  92. #-----------------------------------------------------------------------------
  93. # return: void
  94. #=============================================================================
  95.   alias vx_update_stop update_stop
  96.   def update_stop
  97.     if ENABLE_CUSTOM_CHARACTER_ACTION
  98.       vx_update_stop
  99.       if ! moving? && ! jumping?
  100.         @index += 1
  101.         if @index > 50
  102.           @index = 0
  103.           if ! @stop_action
  104.             @stop_action = true
  105.           else
  106.             @stop_action = false
  107.           end
  108.         end
  109.         if @stop_action
  110.           self.sprite.zoom_y = 1.09
  111.         else
  112.           self.sprite.zoom_y = 1
  113.         end
  114.       end
  115.     else
  116.       vx_update_stop
  117.     end
  118.   end
  119. end

  120. #===============================================================================
  121. # Class: Spriteset_Map
  122. #-------------------------------------------------------------------------------
  123. # Description:
  124. #   Define the create activity of character's sprite class instance
  125. #===============================================================================
  126. class Spriteset_Map
  127.   
  128. #=============================================================================
  129. # Method: create_characters(void)
  130. #-----------------------------------------------------------------------------
  131. # Description:
  132. #   Auto call by Spriteset_Map to create all character sprite
  133. #-----------------------------------------------------------------------------
  134. # return: void
  135. #=============================================================================
  136.   alias vx_create_characters create_characters
  137.   def create_characters
  138.     if ENABLE_CUSTOM_CHARACTER_ACTION
  139.       @character_sprites = []
  140.       for i in $game_map.events.keys.sort
  141.         $game_map.events[i].sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
  142.         @character_sprites.push($game_map.events[i].sprite)
  143.       end
  144.       for vehicle in $game_map.vehicles
  145.         vehicle.sprite = Sprite_Character.new(@viewport1, vehicle)
  146.         @character_sprites.push(vehicle.sprite)
  147.       end
  148.       $game_player.sprite = Sprite_Character.new(@viewport1, $game_player)
  149.       @character_sprites.push($game_player.sprite)
  150.     else
  151.       vx_create_chracters
  152.     end
  153.   end
  154.   
  155. end
复制代码

评分

参与人数 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.

在本版发帖返回顶部