how do i get the id of the actor who did something last

i'm trying to set up a system where an enemy dies, which starts a common event which then grabs the id of the actor who killed the enemy (or just the actor who did something last) and puts it into a variable

how do i do that again?
you can't by default because MV does not store that information (it is one of the small improvements added by MZ).

you can either use a plugin that stores that information (I think tsukihime has one iirc), or you have to store that info in every actor skill that can be used, for example by damage coding.
you can't by default because MV does not store that information (it is one of the small improvements added by MZ).
as in who killed the enemy or just who acted last?
Adding onto the above, while it comes with MZ by default, I believe MV has plugins in the DLC > KadokawaPlugins folder that were added for free, including 'LastSubjectActor.js' which stores the ID of the last actor who acted to a variable of your choosing in the plugin settings.
Adding onto the above, while it comes with MZ by default, I believe MV has plugins in the DLC > KadokawaPlugins folder that were added for free, including 'LastSubjectActor.js' which stores the ID of the last actor who acted to a variable of your choosing in the plugin settings.
was i supposed to use the plugin from the kadokawaplugins_new folder instead? the plugin isn't actually doing anything
the plugin isn't actually doing anything
how did you test that?

what variable have you assigned to the plugin configuration?

by the way - there is no such plugin in the new folder...
how did you test that?

what variable have you assigned to the plugin configuration?
i tested it by checking if an enemy's health was at 0, which would run a common event that would check the number of the variable
if the variable was at a number like 1 or 3, it would show a text message
it did not do this however, since the variable would not change, staying at the number 0

i assigned the variable within the plugin's settings to variable 60
use a show text to print out the value of the variabnle, just to make sure that you get the value right.

and you did test with a new game ingame, right? because battletest or load savefiles would both have problems with added plugins.

and what is the core version of your game? just to check compatibility.
use a show text to print out the value of the variabnle, just to make sure that you get the value right.
i have been doing that, still comes up as 0
and you did test with a new game ingame, right? because battletest or load savefiles would both have problems with added plugins.
yeah i've been entirely doing this with new games each time
and what is the core version of your game? just to check compatibility.
core version of the game? like the version my project was originally created in or the current version of rpg maker mv?
core version of the game? like the version my project was originally created in or the current version of rpg maker mv?
go to your project folder, then js folder and use a text editor to open rpg_core.js
the number at the end of the title line is the core version (no number = 1.0).

The core version is the same to what the editor was when the project was created, but you can update it to later versions manually (never happens automatically)
The reason why this doesn't happen automatically is plugin compatibility - some people like to keep at an older core version to use plugins written for those versions that were never updated to later versions.

As such depending on the core version there are compatibility problems with some plugins, some requiring newer core versions and some requiring older versions.
go to your project folder, then js folder and use a text editor to open rpg_core.js
the number at the end of the title line is the core version (no number = 1.0).
i checked it and i'm not sure if there's any problems with my game's version, can't find anything regarding rpg maker mv's current version so i have no way to check if its outdated or not

it's up to date enough to use most plugins, that's the only thing i really know
and what IS the number you found there?
some of the versions have their own quirks and/or are bug-infested, that is another reason why I asked for the number.
and what IS the number you found there?
i believe it was v1.6.2
is that bad at all? does the plugin refuse to work on that version?
I didn't answer because I don't know.
I mainly asked because there are several core versions that are knowing to be buggy, but yours should be OK.

and it is possible that the plugin is incompatible because a lot of the plugins delivered with the editor come from 1.0, but I don't know for that specific plugin.
bumping this a bit, does anyone know of any other plugins that do work?
LastSubjectActor works perfectly in my test game.

Make sure the variable is one that's defined - when you're selecting a variable in the editor, the maximum must be at least that many:
1718425757040.png


If you still can't get it to work, you need to start providing some information like screenshots of how you're trying to use it.
If you still can't get it to work, you need to start providing some information like screenshots of how you're trying to use it.
okay so i'll describe how i'm using it

imagine a troop of 3 enemies, one is a regular enemy while two are special enemies
if one of these special enemies are killed, it will play a common event (there's nothing else in the event page besides the common event script call)
this is what the common event basically looks like:
◆If:variable 60 = 0
◆Text:None, Window, Bottom
: :actor 1 took the traffic cone \n<narrator>
◆Change Equipment:actor 1, weapon = traffic cone
◆
:End
◆If:variable 60 = 1
◆Text:None, Window, Bottom
: :actor 2 took the traffic cone \n<narrator>
◆Change Equipment:actor 2, weapon = traffic cone
◆
:End
this isn't what it used to look like because i rewrote it thinking that i figured out how to use the plugin when i hadn't
the first part of the common event works fine, but that's because variables are at 0 by default
when the second actor kills one of the special enemies, it doesn't do the second part of the common event, it still does the first one

this is because the plugin isn't doing anything to the variable (to be clear: it is set to 60 in the plugin's settings, and the max amount of variables is 60+)
the variable always stays at 0 regardless of the people in the party (i checked this prior to rewriting the common event) and the actor actually fighting

i'm certain that i've gotten everything correct here
@DillonVentures
That is NOT what @ATT_Turan asked for.
You were asked to provide screenshots of everything you entered, not to describe how you want it to function.
And that is because only a screenshot usually contains the detail where you went wrong.
You were asked to provide screenshots of everything you entered, not to describe how you want it to function.
And that is because only a screenshot usually contains the detail where you went wrong.

Screenshot 2024-06-15 020954.png

this is the troop page, page 4 is the same but for the other special enemy and page 2 is for the regular enemy, the other pages do not matter
Screenshot 2024-06-15 021844.png

this is the common event, haven't altered it since my last post
Screenshot 2024-06-15 021339.png

and this is the plugin and its parameters
everything is (mostly) as described

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-get-the-id-of-the-actor-who-did-something-last.169118/