making repeatable event enter map through one door and exit another

DadGuyDrawing

Veteran
Veteran
Joined
Apr 15, 2020
Messages
58
Reaction score
20
First Language
English
Primarily Uses
RMMV
i'm trying to make an NPC appear as if they leave one door, walk to another door and exit. While the event/NPC is moving, I would like the PC to be able to interact with the event with the action button. I set this up using switches and can get this to work once, but when I reset the switches and try and retrigger the event I can't get the event to appear back in the starting position.

Here is how I set it up:
1) switch 1 - Maids1GoToWork = ON
open door
make event transparent and get in doorway activate Maid1StartRoute = ON
2) Maid1StartRoute = ON
custom route to x,y
script: if x,y, switches go off
script: if x,y, jump to x2, y2

This works ok, but somehow seems to be missing the jump to portion, because when I reset the switches and try again the event reappears at the end of its route.

I think it is something to do with the "set movement route" it seems like maybe this only works on an event page once.

Any help would be appreciated!
 

Attachments

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
what does "InteractNPC" do?

if it Erase Event-s, that's your answer.
the event goes, finishes, and is removed.
 

DadGuyDrawing

Veteran
Veteran
Joined
Apr 15, 2020
Messages
58
Reaction score
20
First Language
English
Primarily Uses
RMMV
thanks for the reply, "InteractNPC" makes an NPC interaction HUD pop-up. but the event/NPC won't restart in the correct location, even if I dont trigger the InteractNPC with the action button. The event still exists, when I activate it the second time, the event removes transparency so I can see it, but it is not restarting in its start location
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
but it is not restarting in its start location
because it's start location is it's own location, and you moved it by making it go.
the event is "done".
if you need to relocate it, force it to go to it's start location at the beginning of it's move route.
if you exit and enter the map again, it'll be at it's start location (provided the condition is validated)

when you're working with multiple conditions, force the event to jump to it's expected "start" location at the beginning of each segment of it's movement.
once the event runs and is done, it'll stay at it's last location until you exit the map (or, you teleport it by resetting it's move route, which should start with that teleport)

the "start" location is provided by the editor.
once the game is under it's own power, the start location is just "a" location, at map level, that the event reads.
 

DadGuyDrawing

Veteran
Veteran
Joined
Apr 15, 2020
Messages
58
Reaction score
20
First Language
English
Primarily Uses
RMMV
Thanks, testing this out now.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
If you want to safe some work and time with the Event Teleport, you could use this Scriptline
in the Autonomous Moveroute:
Code:
$gameMap.events()[ this._eventId - 1 ].setPosition( $dataMap.events[ this._eventId ].x, $dataMap.events[ this._eventId ].y );
It resets the Event Position back to its original one from the Editor, the one on which the Event gets on after Mapreload.
 

DadGuyDrawing

Veteran
Veteran
Joined
Apr 15, 2020
Messages
58
Reaction score
20
First Language
English
Primarily Uses
RMMV
Thanks very much to GSTV87, after a week of trying to get this to work, your explanation helped me to finally get this over the edge. The key was understanding that the start positioning was the same as the last position that it was in, so I forced the event to transfer to its "start location" at the beginning of their movement route. Thanks so much for your help!

Also thanks very much to Bex, I've added your script to my repertoire and I'm sure that it will be useful for getting my pesky NPCs to do what I want them to.
 

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