$gameMap.event().screenX Not work ? [SOLVED]

Hi guys.


i try get the screenX of a dynamic event but not seem work , if some can explain me why 🙂


$gameMap.event().screenX


This give me 


function () {
var tw = $gameMap.tileWidth();
return Math.round(this.scrolledX() * tw + tw / 2);
}


I try many way but without success.
Iam no Scripter and i have no Idea what your seccond code does, but:


$game_map.events[1].x
$game_map.events[1].screen_x


Insteed of using a number for the Event ID you could make it dynamic with a Variable Pointer.


$game_map.events[$game_variables[1]].screen_x


If Variable1 got the value 5, than the Event ID is also 5.


Edit: Sorry i oversaw that this isnt VX-Ace. Not sure if this is Helpfull in MV. My fault.
Edit: Sorry i oversaw that this isnt VX-Ace. Not sure if this is Helpfull in MV. My fault.

Yes is for VX ACE, sorry i forget to told is for MV
No no , i oversaw that its in Java Script Area and not in Ruby.  Free Push 🙂


Good luck i hope you get an Answer.
Ok thats is so stupid !! wast my time haha!.


Ok the soluce i found here in a JAP website !


http://blog.naver.com/PostView.nhn


So if other who seeks the solution


$gameMap.event(3).screenX   // bad no work


$gameMap.event(3).screenX() // Good working


🙂 @+

Original thread: https://forums.rpgmakerweb.com/threads/gamemap-event-screenx-not-work-solved.68336/