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

[转载发布] Follower's Move Routes

[复制链接]
累计送礼:
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 19:55:53 | 显示全部楼层 |阅读模式
    Follower's Commands

    (also known as Follower's Move Routes v.2.2)



    Introduction

    This little script is a new approach to my Follower's Move Routes that allows the usage of other event commands such as Show Animation, Show Balloon and Set Event Position, and of course, Set Move Route.

    It also allows making the followers wait. (v.2.1)

    You can also use the actor database name instead of following index. (v.2.2)

    Features

    - Easy to use.

    - Compatibility friendly.

    - Lemonade friendly.

    Screenshots

    Spoiler













    How to Use

    Simple put a call script command before each event command that you want to direct to a follower.

    The call script command should be like this →



                    Code:       
    1. $game_temp.lfmr_follower = index
    复制代码

    Where index, the index of the follower. Example →



                    Code:       
    1. $game_temp.lfmr_follower = 1
    复制代码

    You can also use the follower name, like this →



                    Code:       
    1. $game_temp.lfmr_follower = 'Natalie'
    复制代码

    If you want to use the name, remember to put it inside '' or "".

    To make the followers wait while the player is still able to move, use this command →



                    Code:       
    1. $game_temp.lfmr_wait = true
    复制代码

    Replace true with false if you want to make the followers follow the player again.

    Script

    Spoiler                Code:       
    1. #==============================================================================
    2. # ** Follower's Commands (also known as Follower's Move Routes v.2.2.1)
    3. #------------------------------------------------------------------------------
    4. # * This little script allows to use in followers any editor command designed
    5. # to work with events, this includes Show Animation, Show Balloon Icon,
    6. # Set Event Location and Set Move Route.
    7. #------------------------------------------------------------------------------
    8. # * To use it, simple put a script call with the following before each of the
    9. # previously mentioned commands.
    10. # $game_temp.lfmr_follower = follower index OR folower name
    11. # Use $game_temp.lfmr_wait = true/false to make the followers wait/follow again.
    12. # Example
    13. # $game_temp.lfmr_follower = 1 OR 'Name' : $game_temp.lfmr_wait = true
    14. #==============================================================================
    15. #==============================================================================
    16. # ** Game_Temp, Alias to initialize.
    17. #------------------------------------------------------------------------------
    18. # Adds variable to contain follower's index and to turn on/off following.
    19. #==============================================================================
    20. class Game_Temp
    21. #--------------------------------------------------------------------------
    22. # * Public Instance Variables
    23. #--------------------------------------------------------------------------
    24. attr_accessor :lfmr_follower ; attr_accessor :lfmr_wait
    25. #--------------------------------------------------------------------------
    26. # * Initialize Alias
    27. #--------------------------------------------------------------------------
    28. alias lemony_moveroute_initialize initialize
    29. #--------------------------------------------------------------------------
    30. # * Initialize
    31. #--------------------------------------------------------------------------
    32. def initialize
    33. lemony_moveroute_initialize
    34. @lfmr_follower, @lfmr_wait = nil, false
    35. end
    36. end
    37. #==============================================================================
    38. # ** Game_Interpreter
    39. #------------------------------------------------------------------------------
    40. # Alias to get_character to return the desired follower if an index was set.
    41. #==============================================================================
    42. class Game_Interpreter
    43. #--------------------------------------------------------------------------
    44. # * Get Character Alias
    45. #--------------------------------------------------------------------------
    46. alias lemony_moveroute_get_character get_character
    47. #--------------------------------------------------------------------------
    48. # * Get Character
    49. #--------------------------------------------------------------------------
    50. def get_character(param)
    51. i, $game_temp.lfmr_follower = $game_temp.lfmr_follower, nil
    52. fc = $game_player.followers[i] if i.is_a?(Integer)
    53. fc ||= $game_player.followers.each {|f| return f if f.actor.name == i} if !i.nil?
    54. i.nil? ? lemony_moveroute_get_character(param) : fc
    55. end
    56. end
    57. #==============================================================================
    58. # ** Game_Follower
    59. #------------------------------------------------------------------------------
    60. # Alias to chase_preceding_character for preventing the execution if a move
    61. # route exist for this character or for the preceding one.
    62. #==============================================================================
    63. class Game_Follower < Game_Character
    64. #--------------------------------------------------------------------------
    65. # * Public Instance Variables
    66. #--------------------------------------------------------------------------
    67. attr_reader :move_route
    68. attr_reader :original_move_route
    69. #--------------------------------------------------------------------------
    70. # * Chase Preceding Character Alias
    71. #--------------------------------------------------------------------------
    72. alias lemony_moveroute_chase_preceding_character chase_preceding_character
    73. #--------------------------------------------------------------------------
    74. # * Pursue Preceding Character
    75. #--------------------------------------------------------------------------
    76. def chase_preceding_character
    77. p_c = @preceding_character if p_c.nil?
    78. return if (@move_route != @original_move_route) || (p_c != $game_player &&
    79. (p_c.move_route != p_c.original_move_route) || $game_temp.lfmr_wait)
    80. lemony_moveroute_chase_preceding_character
    81. end
    82. end
    复制代码





    Author's Notes

    Free for use in commercial/noncommercial games, no credits needed.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-18 08:56 , Processed in 0.137948 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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