Record of Enemy's Skills Used

In scripting, how can you store or show the record of all the enemy's skills it used during the battle phase?

Ex:

Slime

 -> Skills: Poison

Then during battle the slime used poison. How can I keep track of the recently used skill by the enemy?

I wanted to push that skill to be learned by the actor after each turn.
I played around with this idea at some point.


Instead of storing the most recently used skill, I would just store all actions made.


http://www.rpgmakervxace.net/topic/7353-action-history/


Basically, when they perform an action, store that action somewhere.


If you just want to know the most recently used action, then you can pretty much just keep overwriting the same variable.
by what I understood on your script: this part takes the last action:

# returns the last action performed. def last_action get_action(-1) end# returns the n'th action performed on a given turn. If there is no# action then an empty action is returneddef get_action(index)@action_history[index] || Game_Action.new(self)endif I have to store them in a variable, wouldn't that be ambiguous whether its a skill, attack, guard or wait?
They are all skills.


If you store it as an instance variable then you just need to check what kind of action it is.
got it working now, tnx!

Original thread: https://forums.rpgmakerweb.com/threads/record-of-enemys-skills-used.23483/