check eventId from another functions?

Erm Hi : =)
You see that i try to run a simple function for each Event in the map (RPGMV)
$gameMap.events().forEach(function(event) {
if (event._stb) {
if (event._stb == 1 && event.x == 16 && event.y >= 26) {
$gameMap.event(X)._ccheck = $gameMap.event(X)._ccheck || 0;
$gameMap.event(X)._ccheck = 1;
}}});

But within this function, i need to get eventId of the event that is running this code (assume that i don't know it)
I tried several ways but cannot get eventId of the "host" event
Please help, thank you :=(
There ya go my bud:

The event ID:
Code:
this._eventId

The whole event
Code:
$gameMap.event(this._eventId)
There ya go my bud:

The event ID:
Code:
this._eventId

The whole event
Code:
$gameMap.event(this._eventId)
Hi @KanaX := )
Thank you but when i ran
$gameMap.event(this._eventId)
inside of another function (like my sample code above) it will give 'undefined' error
Where do you run it from?

Edit: I stupidly assumed that you are using script calls, which isn't the case.

try this'n:

Code:
event._eventId
Thanks @KanaX := ) everything going well with your Spriter Battle plugin?
Working out some weird flickering and timing issues but the gist of it is done 🙂 Did it work?
Working out some weird flickering and timing issues but the gist of it is done 🙂 Did it work?
It did not work but i realized that i was asking for an impossible thing : =P
Okay, again, show me where you are using it 😛 Or tell me what you want to do.
Thanks for your kind @KanaX
however i make it simple by assign the hostId to a global variable like this:
var test = this._eventId;
$gameMap.events().forEach(function(event) {
if (event._stb) {
if (event._stb == 1 && event.x == 16 && event.y >= 26) {
$gameMap.event(test)._ccheck = $gameMap.event(test)._ccheck || 0;
$gameMap.event(test)._ccheck = 1;
}}});
Erm.. so it's is kinda of a curious question only.. : =)

Original thread: https://forums.rpgmakerweb.com/threads/check-eventid-from-another-functions.98350/