Before we begin, I'd like to stress the fact that I am NOT going to put "Control Variable [0001]: (Events X Co-ordinate)" all over the screen. I've tried, and it was super laggy, and this was on a 17 * 17 map.
So, the question is simple. How can you track a specific event's x and y co-ordinate? Woratana made it look so easy with his mini-map script, but I've tried to replicate it to no avail. Is there any way I could do this?
I can't see why that would be laggy; it's a very simple operation. How many do you have going? In any case, it's the best way to do it for eventing purposes as far as I'm concerned. Unless you are doing it in a script and not an event?
If you are doing something with events and getting lag, then just try to avoid setting the variable or checking it unless you need to, and put in wait frames instead of running the event every frame.
If you tell me what you are trying to do, I can show you a way to do it that would be relatively lagless.
In terms of scripting, the method to retrieve the x or y of an event is just:
$game_map.events[event_id].x
$game_map.events[event_id].y
Why would you have Variable events "all over the screen" - You need 1 common event to do it. No lag. You did it wrong.
Quote from: modern algebra on April 28, 2010, 11:56:57 PM
In terms of scripting, the method to retrieve the x or y of an event is just:
$game_map.events[event_id].x
$game_map.events[event_id].y
That works fine. I thought it was $game_map.event :( One s can make a big difference.
And I filled up the whole 17 * 17 map with events. For example, the first event (on coordinate 0,0), I had
Control Variable[0001]: == 0
Control Variable[0002]: == 0
Which proved to be really laggy (or at least on my computer). And Mr. Graf, I'm not much of an event guru... Could you explain how that would work?
Anyways, thanks to both of you.
* RESOLVED *
Wow, you definitely don't need to do that. Just one event keeping track of the variables will do the trick for you.
Quote from: Zylos on April 29, 2010, 12:08:35 AM
Wow, you definitely don't need to do that. Just one event keeping track of the variables will do the trick for you.
Lol, like I said, I have no idea how this would work. Oh yeah, I forgot I wanted to track the event's co-ordinates into a variable, if that would make things easier/harder.