what is this in set moveroute and how to call it by script

never mind got it
it is this.character(0)


-------------------
I check out that in move route mog plugin can call this to work with event in many way
and in show text it show (this) as [object, object]
it like the object property of that event or some thing?
so I want to do some work around with it
but don't have the idea how to get the even property out of setmoveroute
any Idea?
thank you
I don't think that would work inside a move route, unless Mog added a new function. The Script event command is run by the Game_Interpreter class, so this is the Game_Interpreter object. But the Script command within a move route is run by the Game_Character class, and this is a character object, not the interpreter object. There is no character(n) function under Game_Character, unless Mog added it.

In the event command, this.character(0) will give the event that's running the command. But in a script call in a move route, this IS the event (rather character, as it could be the player as well), so you don't need to call character(0).

I hope that wasn't too confusing.
I don't think that would work inside a move route, unless Mog added a new function. The Script event command is run by the Game_Interpreter class, so this is the Game_Interpreter object. But the Script command within a move route is run by the Game_Character class, and this is a character object, not the interpreter object. There is no character(n) function under Game_Character, unless Mog added it.

In the event command, this.character(0) will give the event that's running the command. But in a script call in a move route, this IS the event (rather character, as it could be the player as well), so you don't need to call character(0).

I hope that wasn't too confusing.
actually I confuse you with my poor english
I want to call the (this) outside the set move route aka even page like you explain
thank you
actually I confuse you with my poor english
I want to call the (this) outside the set move route aka even page like you explain
thank you
Spoiler
JavaScript:
$gameMap.event(this.eventId())
or... this.character(0)
At work typing from my phone at the moment but pretty sure I think that might do what you need?

Edit: oh lol nvm it looks like you got it already.

Original thread: https://forums.rpgmakerweb.com/threads/what-is-this-in-set-moveroute-and-how-to-call-it-by-script.117956/