Is there a plugin, compatible with Yanfly's stuff (or directly from Yanfly) that does that?
Balloon icons on followers not leader
JS Plugin RequestsI usually do this by script
With x as the follower number (from 0) and y as the Ballon id.
Code:
$gamePlayer.followers()._data[x].requestBalloon(y);
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?
@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.
- 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_charactergets 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_characterwill be overridden:
Like TWings said, replaceJavaScript:this._character = $gamePlayer.followers().follower(x); this._character.requestBalloon(y); this.setWaitMode('balloon');xwith the follower index andywith the balloon ID~
- 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'); }; }
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?
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:
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:
www.yanfly.moe
- 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); }
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:
Events and Movement Core VisuStella MZ - Yanfly.moe Wiki
Original thread: https://forums.rpgmakerweb.com/threads/balloon-icons-on-followers-not-leader.122064/