[SOLVED] Store Party Leader's Current State ID

Hello!

I'm wondering if the system stores the party leader's current state ID somewhere.
I want to show the animation of the current state. I was trying something like:
Code:
$game_party.leader.animation_id = X

Where X would be the ID of the current state.
Is this possible?

Thanks in advance 🙂
An actor could have various state id at the same time. Like being stunned, poisoned, and enraged at the same time. What do you mean specifically by "current state id"?
You can get all of his states via

$game_party.leader.states

It will return the array containing all states (or state_id Im not sure) of the party leader.

As TheoAllen said, normally he can have multiple states, so if you want a specific state, you need to tell us how you plan to pick which state will show.
@TheoAllen @Engr. Adiktuzmiko You're both right! I was testing the effect with only one state, and I had not thought about more than one state...
Well what I want to do is to show the animation of the state when the "Message when the state remais" is displayed correspondig to the state of the message. Like "You're still burned" and the burned state animation is displayed.

I have to say that I'm using Hime's State Animations Script that shows an animation when the state is added / removed. So I was trying to show the same effect that it's indicated in the state note box every time the state remains (but not in loop like othe scripts do).
I don't even know if this is possible, but I was trying unsuccesfully...

You can find the script here:
https://himeworks.com/2013/08/state-animations/

I hope that you can help me

EDIT:
Well, I just realized that the "Message when the state remais" only show's the message of the state with higer priority, and I don't know if there's a way to display the message of all the party leader's current states with the corresponding animation (Maybe I should create a new topic asking for that...)

EDIT 2:
I just finded an alternative solution. I finded the "State Effect : End Turn/Action Skill" script by Shad3Light that brings you the possibility to cast a skill when youu have certain states applied, then I created a skill with the animation and the text that I want to display when the state remains.
It does the thing in a certain way, so you can close the topic due to being solved! Thanks for all 🙂

Original thread: https://forums.rpgmakerweb.com/threads/solved-store-party-leaders-current-state-id.109393/