How to know which actor did which action?

Khaikaa

Warper
Member
Joined
Apr 14, 2017
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Hi everybody, I'm Khaikaa, a little game developer. As you can see by my registration date, I'm here since a few, but never posted anything until this momment.

I just started to mess with the code and I find it a bit hard to follow. I was wondering if someone with enough experience could give me a hand with the following issue:

I want to control some battler's info through common events called by skills(so I can do things such as changing classes inside battle and stuff). I know I can get info using some code such as $gameParty.battleMembers()[0].actor() (so I can get info from the first battler of my party). The problem is that I have no idea about how to know which actor called the skill/common event. I'm sure this may be so easy, but I just couldn't figure it out by myself.

Please, I'm not interested in plugins or stuff which do this kind of things by themselves, I want to know how can I do this by myself.

Thank you!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,483
Reaction score
982
First Language
English
Primarily Uses
You can do BattleManager._subject in your common event to get the actor whose turn it was when the event was called.
 

Khaikaa

Warper
Member
Joined
Apr 14, 2017
Messages
2
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
You can do BattleManager._subject in your common event to get the actor whose turn it was when the event was called.
I knew there should be an easy way to get that info! thank you so much! :)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
1,483
Reaction score
982
First Language
English
Primarily Uses
You're more than welcome!
 

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

Latest Threads

Latest Profile Posts

Music is my life, getting noticed for it is the best compliment I can get. So thanks to those who expressed interest :)
character for fun, based on various friends input.

I've noticed that the website has changed a lot since I left in August last year...
One of my kitties after a long, tiring day of being adorable.
We have good wifi here now thanks to a guy who had the audacity to tell the Director "Sir, the wifi sucks. Make it faster and increase the bandwidth" in this arrogant tone. The Director is a complete sweetheart so he did just that. So you may see me around often now, being disturbing as usual.

Forum statistics

Threads
93,361
Messages
911,674
Members
122,853
Latest member
Ordan
Top