Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Event Touch Trigger Problem when transfering maps

I have two maps each with an event that is set to the event_touch trigger. The first transfers the player to the second map, the second displays a message. Both events have the same coordinates. When you touch the transfer player(event 1) it takes you to the second map, then runs event 2, even if you are not transfered onto event 2. (this is just an example, this behaviour occurs no matter what the second event is) I've found that setting the trigger to player touch removes the problem, but there are cases where I want to use event touch, so I was wandering if anyone new what causes the problem to do this. I have tried pinpointing where in the scene_map loop the program decides to execute event 2, it appears to be right after the first interior loop breaks, though why there is beyond me. Thanks in advance for any help, this is begining to drive me nuts...

*edit
The problem seems to arise from event_start_auto in game_events, I wager that the game still thinks your coordinates are what they were before transfer, so that when it checks if you start on an event touch square it detects the second event, even though the coordinates don't really match, then it runs this. Whatever the case, if you want to fix this, add "and self.event.name != NAME" onto the end of the conditional right above th word start; then whenever you name an event NAME it will not behave as the second event above. If anyone has a better explaination of why rmxp thinks you're on a square you're not(if I'm incorrect), please let me know, I'm rather curious.

P.S.
I'm sorry for posting this...evertime I have a problem, no matter long I work at it, I figure it out within twenty minutes of asking for help:)
 
I think I understand what you are trying to say.

If you have two maps that are listed over or below each other on the map list that is in the bottom left corner and on each of those maps you have a transfer event overlapping on the same coordinates then when u trigger one it transfers you and triggers the next. This is a pain in the buttocks but there is a simple enough solution...dont overlap the events. Just move one of them one block over and presto el fixo.

If you cannot bring yourself to have a transfer not exactly on the edge of the screen then not only is that just a lil bit anal but also remember maps are completely customisable and you can shift it or make it however you want, so make map #2 one row larger than map #1 and again presto el fixo.
 
Your right that that would work for transfers, but that was just an example. Imagine if you have two maps, one with a transfer on it and that other with a wandering monster that starts a fight on contact. If the monster happens to be at the same coordinates(due to wandering about) as the transfer tile, then you will have a fight upon arrival, even though the monster never touched you. I know it's not much of a big deal, but I'm not a big fan of things doing things they shouldn't; it adds a potential for things to go wrong when someone is playing your game...
 
Actually, I think that if you were to transfer to another map, the enemy events don't move until you actually transfer there so I think you're okay. As long as you don't put them within something like 2 or three squares of where the player ends up after the transfer, you should still have time to move before an enemy could get there.
  If all of the enemy events were to process even when you are not on that map, your game would lag very badly so I'm pretty sure that they do not move while you are not there.


Hope this helps!
~xgamexfreakx
 
Yeah thats right the monsters or any other event do not wander around until you are actually on that map so as long as the two are not overlapping it still shouldnt be an issue.

Ive had to rework entire maps so my events do not line up. But if you pay attn to where you place events its not an issue. It a glitch thats easy to live with even though it can be a pain.
 
I didn't mean that the events move around when you're not on the map that would be insane. However, if I go from 1 to 2, wander around a bit, then go back to 1; it could happen that one of the events on 2's last position had the same coordinates as the transfer on 1, you couldn't control this given random movement etc.

I disagree that it is an easy glitch to live with: anything that requires me to reorganize event placement and map size is a hassle, I shouldn't have to check all incoming maps before I put events on it; also sometimes having a group of maps be a uniform size can have a purpose. Also, given that it can make events run when they shouldn't, even though the odds are small, isn't something I consider good. But, most of all, is that this isn't a glitch you need to live with; what's easier, renaming an event to "stable" or checking that map sizes and event positions work out?
 
Actually, if I remember right, the events reset to the starting positions after you leave the map. I'm not 100% sure on that but I'm pretty darn. Although, I think I'm misunderstanding your question here. Are you maps one atop the other? That seems to be what sort of question that you are posting, yet that doesn't seem reasonable so I'm having to assume that they are two different maps. I'll test this on mine though I think you are referring to something like, you walk into a house and then come back out and end up on top of, say an enemy that was following you before. Am I correct? I'm really just not seeing the problem here. One last stab at it though before I have to go... (wow, that was really confusing...  :crazy: )

So, I'm going to assume that your problem is switching between an outdoor area and an indoor area (a field and a house), both maps which are on the same map-drop-down thing in the editor. Your problem would then be for some reason ending up on top of an event when you transfer back. Right?

SO, to solve this, first, you have to make sure that you do not transfer onto an 'event touch' event. Any other event should be okay. Player touches don't do anything and action button, parallel process, and auto-starts are irrelevant. So, when placing an event that is an event touch command, just be sure to place them at least 3-4 squares away if not more just to be sure. I don't think that it would memorize where things are when you leave a map.

Okay, I just tested this with an event and it starts back where it should be, even when it was right behind me when I switched maps. So, I'm thinking that you might have been referring to something more like a transfer player event. In this case, you want those set to a player touch and not an event touch.

Hope this helps!
~xgamexfreakx
 
I was refering to a transfer player event and was refering to two maps; not sure what you mean by maps on top of each other; do you mean layers? I forgot that the events reload to where they were intially(sleepy right now) But, the event on the second map doesn't have to be a transfer; any event that is set to touch event goes off. So if you go from one map to another and happen to have both the same size and the second has a touch event at the edge, trouble. Or, what if you put a teleporter in the middle of a room that transfers out to fifty different maps selected out of window; then none of those can have the same coords as the teleporter.

Just in case I'm not being very clear: by same coordinates, I don't mean that you transfer onto the event, but that the event that activates on the second(new) map has the same coordinates as the transfer event from the first map, even if you transfer in onto diff coords. The reason I don't like this is that if your forget it about one time and have something that flicks a switch when stepped on, and is not used till later; then you might never realize how it got flicked early.

At any rate, if you look at my opening post under the edit, you'll see that this is due to the way the game checks for auto_start events; and that I've already resolved this(Did so within 41 minutes of my post, actually) Sorry, if I wasn't more clear :)

Lastly, the game seems to check for auto_starts before updating your coords. This doesn't seem sensible to me, even if not a big deal; just a small glitch, still it is not something I want to deal with; thus, the solution I posted above.

P.S.
Sorry to drag on, if this comes off as sarcastic/rude it's not meant to be; I'm just really sleepy at the moment and should goto bed :)
 
You're not being sarcastic or rude. But the behavior you are describing doesn't make any sense.
If I transfer from MAP001, X0, Y0, to any position on MAP002, and on MAP002 is another event with an "Event Touch" trigger at X0, Y0, the 2nd event does NOT execute until you try to step on it.

There is no method called "event_start_auto".  There is a method called "check_event_trigger_auto"

Which should be irrelevent, as that method only executes "start" if the event trigger is set to 'autorun', and you specifically said all your events were 'event touch'

If you had the 2nd event on 'Autorun', then it would start as soon as you entered the map, regardless of where you transferred to.

<scratching head>  :scruff:
 
I do know what hes talking about since I had this problem at one time.

Here to simplify, this is your list of maps on the bottom left corner...

Map A
Map B
Map C
Map D
Map E
Map F

Map A and B cannot share event coordinates nor can B and C or C and D.
But A and C can share event coordinate with no problems and so can F and B.

Follow?

It took me awile to figure out this was happening. I would have transfer events placed on top of each other and at one time had my characters jumping between 5 maps when they were just supposed to jump from the first to the second. It was a pain in the tookus and I couldnt figure out what was wrong. I checked my event settings over and over again before I realized it was just the placement (I was a noob at the time).

But it is really easy to live with. So you move an event over one or two or have a map inbetween. It take mere seconds to check coordinates and if you want to make maps successfully you cant just copy and paste for uniformity. Maps become dull and boring that way. Plus you dont have to go back through all the maps, just the one before the other on the map list.

If you want to map identical layouts just create the basic and shift the whole map over one. I do that for towers or houses that have the same up and down basic layouts.

Another fun thing you can do if you are feeling adventurous is to create both level on one map, just far enough apart so you cannot see the floor your not on when playing the game. There is no lag unless you have around 100+ events anyways so for smaller scale standard maps its fine. I actually found this to be the easiest way to create house maps and such. Keeps me from having too many maps. Im already upward around 200 for my game as it is!!!

Anyways sleep well Phoenixia!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top