struck by a car

well i am trying my charater will be strucking by a car but i can not that. i would like the car appear outside the map and later it comes to me and pass over to me and later game over, is there any scrip that can help me or how can i do that? ty for read.
as far as I know you cannot have events outside of the map.
What you can do is make a map bigger than the view on screen, and have the car event just out of view.
$gameMap._events[eventid].locate(newX, newY);
set newX / newY to coordinates outside the screen, 😀  then you have to worry about getting it back in the screen lol. This will instantly transfer the event outside of the screen, the coordinates specified.

$gameMap._events[eventid]._x = X;
should work, setting the location like this ignores the check to see if the player/event can move if I remember correctly :x good luck~. 
are thouse scripts? do you have a link?
Theyre script calls, I dont have links these were just something I used a while back as well, you can use them in an event if you want or make a script with them, I'd build the plugin myself, but I dont really have time T_T apologies.
well i did some things with the map and the event is almost finish but i don´t know how i can activate a event when the event touch my character(when the car touch me)
MV has the page condition "on player touch", right? Just put that as the condition on the car event, instead of "action button", and then on the event page put whatever you want it to do.
You could make the first page of the car event trigger with a switch, that way the car image won't be there until the switch is turned on. The movement of the car occurs automatically (thus autorun) when the switch is triggered. When you want the car to disappear again (like a hit and run), turn the switch off. If you want the car to stay but be stopped and not participate in the event anymore, you can turn on self switch A, for example, and in the next page, have the image of the car with the "action button" trigger. Also, you probably don't need the "Through ON" command that I have in the movement route (in my case, I needed the car to move on the street, which is normally an impassable tile). Hope this helps!

Untitled.png

Original thread: https://forums.rpgmakerweb.com/threads/struck-by-a-car.61293/