Event placement not triggering map transfer

First of all, if this has already been asked and I missed it in the VX Ace support forums I'm sorry, but I honestly didn't see it when going through them.

Alright, I'm assuming my problem is with not knowing how to properly use variables, but whenever I think I have it figured out the event simply disappears instead of triggering the whole thing.

Event "A" needs to be moved to position "B" (which works fine) but when it reaches position "B" it is supposed to:

  • View attachment 8344
  • disappear,
  • transfer the player to another map (Position "C")
  • and make another copy of it appear in front of the player (Position "D") as if the player had carried it downstairs with them.
  • View attachment 8345
  • The event then needs to be pushed into position "E" which then triggers a cutscene.

So now you know the desired flow of events, but as I said, when I tried using variables to trigger these event "A" disappeared entirely and nothing else happened! How do I fix this?

*EDIT*

Anyway, another relevant fact I had forgotten to mention is that I am using VX Ace Lite so I am limited to ten events total and  7 of those are doors, 5 of which keep opening and closing too quickly for the player to go through. (They ARE supposed to be doing that, they are in a haunted house and most of the doors on that floor keep slamming to "scare" the actors.)
I would suggest you use Switches, rather than variables, however I can't really help you much without seeing your actual Event Box. It'd be a lot better to correct yours so that you can learn, rather than create the event and post it for you.
I'm sorry, I didn't save a screenshot and deleted the event page so I could try other methods. I think I went through about a dozen of them before giving up! 😛

I'll try to recreate them and post the screenshots, but it may be several days before I can get back online to do so.

Anyway, how would switches tell where the event was placed on the map? ?_?
Yeah, I think you need a switch here. The way I'd do it is make a switch to make Event A appear, then when it's moved to point B, Transparency gets turned ON, and the switch turned off. (Or just turn the switch off, whichever, just make sure it doesn't appear again when you leave and go back). Then, at Point C, either make a second switch for that event (so it doesn't appear there when the first is on), or use the same event with the same switch, then just move it to Point E.

I don't think I explained that well, but that's one way of working it. xD
My problem with that method is mainly in knowing exactly how to make the switch "aware" of its position on the map. How do I do that?

I think once I know that I can figure the rest out pretty easily...But I won't swear to that!
There are a couple of points where I'm a bit confused, but I'll try my best to answer your question 😛 .

First, moving the event to location B can be done with a Set Event Location call (I'm assuming you knew that since you said that worked fine).

From there I see two possibilities. First, you want trigger the event when the player leaves the map/activates it in some way, and transfer it and the player to another map. This is difficult mainly because you cannot transfer events between maps like you can with players.

As a solution, you could write a duplicate event in the next room. Have both event A (moved to position B ) and event B (at position D) be triggered by a switch when you want the player to transfer maps. That way event A will no longer be visible, and you can show event B and have it be usable for the player.

If you want the switch to activate when the event is moved to location B, you don't need to worry about which location the event is in, just have the transfer be called in the same block as the switch.
"aware of its position"? Basically you make a switch for the event's condition, then make the event itself on the map. When you push the event to point B and turn the switch off, during the transition from that floor to the next one, you can either turn that same switch back on (if you make the event have the same switch condition) or turn on the second switch you made for that event's condition.

Or I could be misreading your question. If a switch is set as an event's condition, then all you need to worry about is where that event itself is placed. I don't know if it's possible to get one single event to move around between maps, as I'm not all that pro with RPG Maker myself. But, the easiest way to do it would be with switches.
The event is set to move 1 block away from the player when the action button is pressed so it seems as if it is being pushed, with an empty page switched to to make it disappear.

I guess what I am asking is how does the switch trigger when it reaches that spot?

I'm sorry, but at the moment that is all the event has because I didn't think last night and deleted the version that didn't work...

Anyway, another relevant fact I had forgotten to mention(I'll edit the first post to include it in a minute) is that I am using VX Ace Lite so I am limited to ten events total and  7 of those are doors, 5 of which keep opening and closing too quickly for the player to go through. (They ARE supposed to be doing that, they are in a haunted house and most of the doors on that floor keep slamming to "scare" the actors.)
Ooooh. Mmm. So that's why you were trying to use variables. Well, one thing I can help you with is how the event is moving. Instead of making it move via the action button, you can set the trigger to "Player Touch", go to the event's contents, then set a Move Route to have the event "Move Away from Player". That way it'll move away from you as you walk into it instead of having to hit a button every time to move it. But, that's unless you WANT it to work like that.

As for getting the event to move, other than making two separate events, I'm not sure how to work this out. Sorry. x-x
Ok! In that case what I think you're looking for is a way to check that the event has reached position B. You can set two variables with the x and y values of position B, and then run this check in a Conditional Branch (4th tab, Script) each time the book is moved:

$game_events[@event_id].x == $game_variables[x] && $game_events[@event_id].y == $game_variables[y]Replace [x] and [y] with the ids of the variables you use. Or you could just hardcode the x and y values in, and change $game_variables[x] and $game_variables[y] to 1 and 9 respectively (if that image shows the whole map).
Thanks!

I'll give it a try!

But..Ugh...I think variables are worse than trigonometry! 😛

I gotta learn them though in order to accomplish what I want to accomplish!
Ok! In that case what I think you're looking for is a way to check that the event has reached position B. You can set two variables with the x and y values of position B, and then run this check in a Conditional Branch (4th tab, Script) each time the book is moved:

$game_events[@event_id].x == $game_variables[x] && $game_events[@event_id].y == $game_variables[y]Replace [x] and [y] with the ids of the variables you use. Or you could just hardcode the x and y values in, and change $game_variables[x] and $game_variables[y] to 1 and 9 respectively (if that image shows the whole map).

So like this?

Code:
$game_events[EV001].x == $game_variables[1] && $game_events[EV001].y == $game_variables[9]
Actually, @event_id is an attribute that specifies the current event 🙂 . So 

$game_events[@event_id].x will return the current event's x value. The 1 and the 9 are actual map locations (the second tile in the X direction starting from the left, the 10th in the Y direction starting from the top, since it starts at 0), so you can just put 1 and 9 by themselves:

$game_events[@event_id].x == 1 && $game_events[@event_id].y == 9If you want to hold those values in variables, that's also possible, but then the values specified would be the ids of those variables (whichever slot you used in the variables menu to hold them).
Event.PNG

$game_events[@event_id].x == $game_variables[1] && $game_events[@event_id].y == $game_variables[9]
gets me

Error.PNG

What am I doing wrong? ?_?
Check if you have spaces between all parts of the formula, and write it like this:

Code:
($game_events[@event_id].x == $game_variables[1]) && ($game_events[@event_id].y == $game_variables[9])
the eval function has a few quirks and doesn't always process the formula in the correct way if it's missing spaces or ()
That resulted in this error:

View attachment 8352

I am very confused right now... :dizzy:
Well, you're trying to use variables that I don't think you've set :S. Where are you holding the values for the x and y coordinates of position B? those are the values that should replace $game_variables[1] and $game_variables[9].

1 and 9 are arbitrary values. They are based on a specific tile (position B ), which I assumed from your first screenshot was located at the map coordinate (1, 9). The way you're using 1 and 9 are as array index references to the in-game array of variables.

Try

Code:
$game_events[@event_id].x == 1 && $game_events[@event_id].y == 9
So far I just keep getting the same error...

Error 2.PNG

🤔
WELP.

I'm ed.

My fault entirely.

I was looking at that for 5 whole minutes before I realized my mistake...

$game_map.events[@event_id].x == 1 && $game_map.events[@event_id].y == 9><" SOO sorry!
I'm honestly starting to wonder if there is something wrong with my copy of VX Ace Lite... Should I try a reinstall or something of that sort?

Anyway, time for me to go. Hopefully be back early next week. Ttyl and thanks for trying to help!

*EDIT*

That worked! It is finally working! Thank you SOOOOOOO much! ^_^

Original thread: https://forums.rpgmakerweb.com/threads/event-placement-not-triggering-map-transfer.18304/