Show Animation in specific Follower?

Status
Not open for further replies.

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
16
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Hi, I've been practicing a bit more with the RPG Maker VX Ace script, but I have a problem with animation.
I would like an animation to be shown on a specific Follower.
I know there is a command to show an animation to the player that is as follows:

Code:
$game_player.animation_id = n
but I would like to know if it is possible to show the animation with a similar command such as:

Code:
$game_party.members[id].animation_id = n
Would it be possible to run the animation with the follower id?
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,343
Reaction score
564
First Language
Italian
Primarily Uses
RMVXA
You cannot use ID, you have to use the relative position for that follower. You can do that using the following script call:
Code:
actor_id = X
anime_id = Y
pos = 0
$game_party.members.each.with_index do |member, i|
  if member == $game_actors[actor_id]
    pos = i
    break
  end
end
if (pos <= $game_player.followers.length)
  character = (pos == 0 ? $game_player : $game_player.followers[pos - 1])
  character.animation_id = anime_id
end
Change X and Y accordingly. X is your actor id, Y is your animation id.

Of course, things are much easier if you want to display the animation on the follower in a certain position rather than on a certain actor. In that case you can simply use:
Code:
$game_player.followers[X].animation_id = Y
 

Christopher Riel

Villager
Member
Joined
Jul 17, 2017
Messages
16
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Of course, things are much easier if you want to display the animation on the follower in a certain position rather than on a certain actor. In that case you can simply use:
Code:
$game_player.followers[X].animation_id = Y

This is what I was looking for.
I thought it was in party_members and not player_followers.
really thank you very much! It has worked very well! :D
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
5,911
Reaction score
4,222
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Is the "2 status updates 24h" still in effect?
My first attempt at Pixel Art :blink::) (I have no idea what I'm doing but I'm doing it)
Plugin instructions: *exists*
Plugin: What did he say? *error*
I feel like it's about time I share all the result of my experiment project here. But there's a lot of it.
Me and brother have an ongoing rivalry. We constantly fight for the High Score in Galaga on our arcade cabinet. Today I take back the top with 239,000. He'll be back. (No-Fire glitch is banned)

Forum statistics

Threads
93,723
Messages
914,937
Members
123,329
Latest member
ChrisCKC
Top