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

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
No no , i oversaw that its in Java Script Area and not in Ruby.  Free Push :)


Good luck i hope you get an Answer.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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


:) @+
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top