Check if actor 1 is start an action and cast an x elemental skills then y state applied to actor 1

Hello everyone,

I've created a system where a variable will be setted to a specific value based on the elementID whenever any elemental skills are casted. Now, I need help figuring out how to check when an actor starts an action.

Specifically, I want to:
  1. Detect when an actor begins any action (like attacking or using a skill).
  2. Execute a piece of code when this happens. (In this case I want to apply a state to the actor)
Can anyone guide me on how to achieve this? Any assistance or examples would be greatly appreciated.

Thank you!
Take a look at the Yanfly Engine Plugins.

There are a few ways you could do this; you could use the Skill Core to put notetags on the skills that set a variable as soon as they're cast.

You could also use Auto Passive States and Buffs & States Core to put a passive state on actors so any time they use any skill it looks for it to have an element and sets the variable.

It depends on what your intended use is.
Take a look at the Yanfly Engine Plugins.

There are a few ways you could do this; you could use the Skill Core to put notetags on the skills that set a variable as soon as they're cast.

You could also use Auto Passive States and Buffs & States Core to put a passive state on actors so any time they use any skill it looks for it to have an element and sets the variable.

It depends on what your intended use
Yes, figured that out, thank you for kind reply!

Original thread: https://forums.rpgmakerweb.com/threads/check-if-actor-1-is-start-an-action-and-cast-an-x-elemental-skills-then-y-state-applied-to-actor-1.168770/