Balloon icons on followers not leader

Is there a plugin, compatible with Yanfly's stuff (or directly from Yanfly) that does that?
I usually do this by script
Code:
$gamePlayer.followers()._data[x].requestBalloon(y);
With x as the follower number (from 0) and y as the Ballon id.
Thank you!
sorry for the double post
@TWings
Working but I have two questions:
a) is it possible to make it so that it "waits" for the animation to be completed (native function if you use the event directly)?
b) is it possible for it to target an actor ID directly?
sorry for the double post
@TWings
Working but I have two questions:
a) is it possible to make it so that it "waits" for the animation to be completed (native function if you use the event directly)?
b) is it possible for it to target an actor ID directly?
a) I'm not sure if it works (can't test it right now), but you can try to add this in the same script call
Code:
this.setWaitMode('balloon');

b) As far as I know followers don't have the actor's ID, only the sprite data.
I'm not sure if there's any simple way to do it beside comparing the sprite data.
  1. The simplest option is to just put a carefully-timed Wait command after the balloon. 😅

    Otherwise: some wait modes, like "balloon", are character-based and so require a character to check for the effect. This _character gets assigned in the Move Route, Show Animation, and Show Balloon commands, so if you have any of those, try to make sure the following Script command comes afterwards or _character will be overridden:
    JavaScript:
    this._character = $gamePlayer.followers().follower(x);
    this._character.requestBalloon(y);
    this.setWaitMode('balloon');
    Like TWings said, replace x with the follower index and y with the balloon ID~

  2. You can fetch actor IDs using Control Variables > Game Data > Party. That'll let you get the actor ID of a given follower (or the leader), which you can use to affect game flow using Conditional Branches. That sounds clunky for the purpose you're after, though. 😴

    To input an actor ID and output a balloon on the appropriate party member, maybe try something like this in a Script command (untested):
    JavaScript:
    var id = $gameVariables.value(1);       // value of game variable 1
    var balloon = $gameVariables.value(2);  // value of game variable 2
    var index = -1;
    $gameParty.members().some(function(actor, n) {
      if (actor.actorId() === id) { index = n; return true; }; return false;
    });
    if (index >= 0) {
      var c = index === 0 ? $gamePlayer : $gamePlayer.followers().follower(index);
      if (c) { this._character = c; c.requestBalloon(balloon); this.setWaitMode('balloon'); };
    }
Rough translation: "we want balloon ID [var 2] to display on actor ID [var 1]. Check the actor ID of each member of the party; if a match is found, get the corresponding map character (player or follower), play the balloon on them, and tell the interpreter to wait for the balloon to finish." 😮‍💨
Sorry for the necropost of my own thread, but these lines of codes don't seem to work anymore on MZ.
But I thought MV and MZ were very similar in terms of code. Is there something I need to alter to make it work?
Yes, MV and MZ are different here. Try one of these approaches instead:
  • Show balloon ID 2 (Question) on follower index 0:
    JavaScript:
    const char = $gamePlayer.followers().follower(0);
    const balloonId = 2;
    $gameTemp.requestBalloon(char, balloonId);

  • Show balloon ID 2 on actor ID 1 if present:
    JavaScript:
    const actorId = 1;
    const balloonId = 2;
    const index = $gameParty.members().indexOf($gameActors.actor(actorId));
    if (index >= 0) {
      const char = index ? $gamePlayer.followers().follower(index - 1) : $gamePlayer;
      $gameTemp.requestBalloon(char, balloonId);
    }
If you want to do "wait for completion", I suggest using a Wait command. This is because MZ has restructured the interpreter wait mode check to use Game_Interpreter#character, which only covers the player and map events, not followers or vehicles.

Alternatively, VisuStella MZ Events and Movement Core (not sure if you're already using that) has a Follower: Set Control plugin command that looks promising:

Original thread: https://forums.rpgmakerweb.com/threads/balloon-icons-on-followers-not-leader.122064/