I'm not much JS coder, but some stuff I know how to do in RMMV with JS, but today I have strange thought about
obtaining Actor Object in game in map (not battle).
I know the differences and how to operate with following methods:
Now I would like to do with clean Script (from 3rd tab in Event Editor) create a variable that would hold/store/represent
object of actor(s) exacly the same as yanfly handles it in his plugins. However what I was able to find in his code from YEP_AutoPassiveStates.js plugin variable user and target (see a piece of his code) are reffering to "this".
Is there a particular way to obtain actor data the same way as in image in map with "script..." event?
More less something like that.
PS: I could just use $gameActors.actor(id) and the $gameParty.members()[id] but with that I have to know ID of current actor.
I want to approach it more dynamicly, without knowing actor's ID.
I tried this:
but property "name" is null
obtaining Actor Object in game in map (not battle).
I know the differences and how to operate with following methods:
Code:
$gameActors.actor(id)
$gameParty.members()[id]
Now I would like to do with clean Script (from 3rd tab in Event Editor) create a variable that would hold/store/represent
object of actor(s) exacly the same as yanfly handles it in his plugins. However what I was able to find in his code from YEP_AutoPassiveStates.js plugin variable user and target (see a piece of his code) are reffering to "this".
Is there a particular way to obtain actor data the same way as in image in map with "script..." event?
More less something like that.
PS: I could just use $gameActors.actor(id) and the $gameParty.members()[id] but with that I have to know ID of current actor.
I want to approach it more dynamicly, without knowing actor's ID.
I tried this:
Code:
$gameActors.actor(this._targetActorId).name();