设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 116|回复: 0

[转载发布] Party Movement Controller

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-1 12:19:01 | 显示全部楼层 |阅读模式
    Made this script for a request here.


            Sharing this here since this seems to have quite the demand.


    Introduction:


            This script covers the Party Leader/Followers movement/balloon icon/animation that can't be done by eventing.


            Can easily set up cut-scene/story telling simply by moving the followers around without having to make events for each of them.


    Features:


            [01] Instant Gather: Instantly Gather all party members.


            [02] Party Jump: All party members jump one by one


            [03] Party Move: All party members move together


            [04] Party Face: All party members face the same direction


            [05] Party Balloon: Pop up balloons for all party members


            [06] Party Animation: Play animation for all party members


            [07] Member Move: Move a single member in line


            [08] Leader only move: Using Member Move will allow Leader only move without followers moving.


            [09] Member Face: Change the facing direction of a single member in line


            [10] Member Jump: Make a single member in line Jumps


            [11] Member Balloon: Pop up a balloon on a single member in line


            [12] Member Animation: Play animation on a single member in line


    How to Use:


            [1] Script is plug & play, copy and paste it below Material and above Main in your script editor


            [2] To activate the party functions, simply use the script calls as instructed in the script.


    Example Usage:


           


            p/s: adding ;wait(60) behind a line pauses for 1 second after the action.


            To make all followers line up behind the leader: (works for all directions)


           


    Movement Commands:

    SpoilerSpoiler



                             "DOWN" = Move Down
                             "LEFT" = Move Left
                             "RIGHT" = Move Right
                             "UP" = Move Up
                             "LOWER_L" = Move diagonally to Lower Left
                             "LOWER_R" = Move diagonally to Lower Right
                             "UPPER_L" = Move diagonally to Upper Left
                             "UPPER_R" = Move diagonally to Upper Right
                             "FORWARD" = Move one step Forward
                             "BACKWARD" = Move one step Backward
                             "TURN_R" = Turn 90 degree Right
                             "TURN_L" = Turn 90 degree Left
                             "TURN_B" = Turn 180 degree Back






    Facing Commands:

    SpoilerSpoiler



                             "DOWN" = Face Down
                             "LEFT" = Face Left


                             "RIGHT" = Face Right
                             "UP" = Face Up
                             "PLAYER" = Face the same direction as the Party Leader






    Compatibility:


            This script uses new & alias methods so there shouldn't be any conflict with this script unless, coincidentally, you have another custom script using the new method names as this script does. 


    Terms of Use:


            Free to use for both commercial and non-commercial games


    Script:

    SpoilerSpoiler



                    Code:       
    1. #==============================================================================
    2. # ■ Meow Face Party Controller
    3. #------------------------------------------------------------------------------
    4. # Control Party Leader and Followers
    5. #==============================================================================
    6. # How to Use:
    7. # Plug & Play, Put this script below Material and above Main
    8. # Terms of Use:
    9. # Free for both commercial/non-commercial
    10. #==============================================================================
    11. =begin
    12. ==============================================================================
    13. Use these script calls below in event's script box
    14. ==============================================================================
    15. ------------------------------------------------------------------------------
    16. To gather all party members instantly:
    17. ------------------------------------------------------------------------------
    18. instant_gather
    19. ------------------------------------------------------------------------------
    20. To have all party jump together:
    21. ------------------------------------------------------------------------------
    22. party_jump(x, y)
    23. where x/y is the position to jump
    24. eg. 3 tiles to the left, use:
    25. party_jump(-3, 0)
    26. ------------------------------------------------------------------------------
    27. To have all party pop up balloon:
    28. ------------------------------------------------------------------------------
    29. party_balloon(id)
    30. where id is the balloon id
    31. ------------------------------------------------------------------------------
    32. To have all party pop up animation:
    33. ------------------------------------------------------------------------------
    34. party_anim(id)
    35. where id is the animation id
    36. ------------------------------------------------------------------------------
    37. To have the whole party move around:
    38. ------------------------------------------------------------------------------
    39. party_move(command)
    40.   command =
    41. "DOWN"
    42. "LEFT"
    43. "RIGHT"
    44. "UP"
    45. "LOWER_L"
    46. "LOWER_R"
    47. "UPPER_L"
    48. "UPPER_R"
    49. "FORWARD"
    50. "BACKWARD"
    51. "TURN_R"
    52. "TURN_L"
    53. "TURN_B"
    54. ------------------------------------------------------------------------------
    55. To have the whole party face a direction:
    56. ------------------------------------------------------------------------------
    57. party_face(command)
    58.   command =
    59. "DOWN"
    60. "LEFT"
    61. "RIGHT"
    62. "UP"
    63. "PLAYER"
    64. ------------------------------------------------------------------------------
    65. To have one party member face a direction:
    66. ------------------------------------------------------------------------------
    67. member_face(n, command)
    68. n = party member in line (0 = leader, 1 = 2nd in line etc)
    69.   command =
    70. "DOWN"
    71. "LEFT"
    72. "RIGHT"
    73. "UP"
    74. "PLAYER"
    75. ------------------------------------------------------------------------------
    76. To have one party member jump:
    77. ------------------------------------------------------------------------------
    78. member_jump(n, x, y)
    79. n = party member in line (0 = leader, 1 = 2nd in line etc)
    80. x/y is the position to jump
    81. eg. 3 tiles to the right, use:
    82. party_jump(3, 0)
    83. ------------------------------------------------------------------------------
    84. To have one party member move around:
    85. ------------------------------------------------------------------------------
    86. member_move(n, command)
    87. n = party member in line (0 = leader, 1 = 2nd in line etc)
    88. command =
    89. "DOWN"
    90. "LEFT"
    91. "RIGHT"
    92. "UP"
    93. "LOWER_L"
    94. "LOWER_R"
    95. "UPPER_L"
    96. "UPPER_R"
    97. "FORWARD"
    98. "BACKWARD"
    99. "TURN_R"
    100. "TURN_L"
    101. "TURN_B"
    102. eg. to have 2nd member in line move lower right
    103.   member_move(1, "LOWER_R")
    104.   
    105. ------------------------------------------------------------------------------
    106. To have a party member pop up balloon:
    107. ------------------------------------------------------------------------------
    108. member_balloon(n, id)
    109. n = party member in line (0 = leader, 1 = 2nd in line etc)
    110. where id is the balloon id
    111. ------------------------------------------------------------------------------
    112. To have a party member pop up animation:
    113. ------------------------------------------------------------------------------
    114. member_anim(n, id)
    115. n = party member in line (0 = leader, 1 = 2nd in line etc)
    116. where id is the animation id
    117. =end
    118. #==============================================================================
    119. class Game_Character < Game_CharacterBase
    120.   def face_player
    121.     set_direction($game_player.direction)
    122.   end
    123. end
    124. class Game_Player < Game_Character
    125.   attr_accessor :through
    126. end
    127. class Game_Follower < Game_Character
    128.   alias meow_init initialize
    129.   def initialize(member_index, preceding_character)
    130.     meow_init(member_index, preceding_character)
    131.     $meowchase = false
    132.   end
    133.   alias meow_chase chase_preceding_character
    134.   def chase_preceding_character
    135.     return if $meowchase
    136.     meow_chase
    137.   end
    138. end
    139. class Game_Interpreter
    140.   def meow_party
    141.     @meowparty = [$game_player] + $game_player.followers.visible_folloers
    142.   end
    143.   def instant_gather
    144.     meow_party
    145.     @meowparty.each do |meow|
    146.       meow.moveto($game_player.x, $game_player.y)
    147.     end
    148.   end
    149.   def party_jump(x, y)
    150.     meow_party
    151.     start_x, start_y = $game_player.x, $game_player.y
    152.     @meowparty.each do |meow|
    153.       meow.moveto(start_x, start_y)
    154.       meow.jump(x, y)
    155.       Fiber.yield while meow.jumping?
    156.     end
    157.   end
    158.   def member_jump(n, x, y)
    159.     meow_party
    160.     @meowparty[n].jump(x, y) if @meowparty[n] != nil
    161.   end
    162.   def turn_face
    163.     case @meowturn
    164.     when "DOWN"; @mew.set_direction(2)
    165.     when "LEFT"; @mew.set_direction(4)
    166.     when "RIGHT"; @mew.set_direction(6)
    167.     when "UP"; @mew.set_direction(8)
    168.     when "PLAYER"; @mew.face_player
    169.     end
    170.   end
    171.   def party_face(meowcommand)
    172.     meow_party
    173.     @meowturn = meowcommand
    174.     @meowparty.each do |m|
    175.       @mew = m
    176.       turn_face
    177.     end
    178.   end
    179.   def member_face(n, meowcommand)
    180.     meow_party
    181.     @meowturn = meowcommand
    182.     @mew = @meowparty[n]
    183.     if @mew != nil
    184.       turn_face
    185.     end   
    186.   end
    187.   def run_member_move
    188.     case @meowmove
    189.     when "DOWN"; @mew.move_straight(2)
    190.     when "LEFT"; @mew.move_straight(4)
    191.     when "RIGHT"; @mew.move_straight(6)
    192.     when "UP"; @mew.move_straight(8)
    193.     when "LOWER_L"; @mew.move_diagonal(4, 2)
    194.     when "LOWER_R"; @mew.move_diagonal(6, 2)
    195.     when "UPPER_L"; @mew.move_diagonal(4, 8)
    196.     when "UPPER_R"; @mew.move_diagonal(6, 8)
    197.     when "FORWARD"; @mew.move_forward
    198.     when "BACKWARD"; @mew.move_backward
    199.     when "TURN_R"; @mew.turn_right_90
    200.     when "TURN_L"; @mew.turn_left_90
    201.     when "TURN_B"; @mew.turn_180
    202.     end
    203.   end
    204.   def party_move(meowcommand)
    205.     meow_party
    206.     $game_player.through = true
    207.     $meowchase = true
    208.     @meowmove = meowcommand
    209.     @meowparty.each do |m|
    210.       @mew = m
    211.       run_member_move
    212.     end
    213.     Fiber.yield while @mew.moving?
    214.     $game_player.through = false
    215.     $meowchase = false
    216.   end
    217.   def member_move(n, meowcommand)
    218.     meow_party
    219.     $meowchase = true
    220.     $game_player.through = true
    221.     @meowmove = meowcommand
    222.     @mew = @meowparty[n]
    223.     if @mew != nil
    224.       run_member_move
    225.       Fiber.yield while @mew.moving?
    226.     end
    227.     $meowchase = false
    228.     $game_player.through = false
    229.   end
    230.   def member_balloon(n, m)
    231.     meow_party
    232.     @meowparty[n].balloon_id = m if @meowparty[n] != nil
    233.   end
    234.   def member_anim(n, m)
    235.     meow_party
    236.     @meowparty[n].animation_id = m if @meowparty[n] != nil
    237.   end
    238.   def party_balloon(m)
    239.     meow_party
    240.     @meowparty.each do |meow|
    241.       meow.balloon_id = m
    242.     end
    243.   end
    244.   def party_anim(m)
    245.     meow_party
    246.     @meowparty.each do |meow|
    247.       meow.animation_id = m
    248.     end
    249.   end
    250. end
    复制代码








    本贴来自国际rpgmaker官方论坛作者:MeowFace处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/party-movement-controller.45165/

    本帖子中包含更多资源

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

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 23:19 , Processed in 0.137657 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表