Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,634
Reaction score
1,457
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,502
Reaction score
412
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,634
Reaction score
1,457
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,502
Reaction score
412
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,634
Reaction score
1,457
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


:) @+
 

Latest Threads

Latest Profile Posts

Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,345
Messages
1,089,173
Members
150,020
Latest member
eungi
Top