"Jumping" into an event to trigger it?

● ARCHIVED · READ-ONLY
Started by shaynec1981 14 posts View original ↗
  1. I'd like to be able to trigger and event that the character jumps onto. For example, have an event with the graphic of a hole, the player in my game can jump onto a normally nonpassable tile if the region ID on that tile is 63. I thought that if I set the event to trigger with "player touch" that when the character lands on the event, it would trigger. However this does not work. How could I make this work? If the only feasible way is through scripting, thats no problem but I was wondering if there was another alternative?
  2. I've moved this thread to VX Ace Support. Please be sure to post your threads in the correct forum next time. Thank you.


    Events won't trigger if the player ends up on them as a result of a move route. If you want your character to jump and then for something else to happen, put the "whatever else is meant to happen" in the same event that makes them jump.
  3. Sorry about that.

    Well, problem is that there will be a myriad of different possibilities and they would change depending on what is being jumped onto. Also, the jump command is issued by the player at any time by key press. So say the player jumps into a hole in one dungeon, the player would end up on the lower floor. Same circumstances but on a different dungeon, they'd need to end up on the lower floor of that dungeon. Jump into a body of water, they die or go to an underwater map. Jump onto an enemy, they auto jump to the next tile past that enemy. Etc, etc, etc. So while it would TECHNICALLY be possible to code a case statement for each possibility, I don't think it would really be feasible. Surly there is a way to edit the default triggering to account for when the player and an event occupy the same space as a result of a jump command? I'm going to dig around in the code but I'm hoping someone else has a good alternative to this.
  4. How many of these events do you have? If only a few, I'd set them up as parallel processes. In the command list do a check to see if the player is on the same tile, and if they are, do whatever action is needed. Then at the end (outside of any conditions), add a Wait 5 Frames or something to avoid lag.
  5. Well, I don't know how many I'll to be exact. I know there will by many spread throughout the game. I'm wondering if

    if $game_player.x == $game_map.events[n].x && $game_player.y == $game_map.events[n].yset as a parallel process on each event will work?

    Edit: Which is essentially what you just said... I'm an idiot sometimes lol sorry.
  6. If they're all going to be the same, you can just use $game_map.events[@event_id] instead of $game_map.events[n] and then you can just copy and paste them without having to change the numbers.

    Or add this to a new script slot:

    class Game_Interpreter alias event_setup setup def setup(list, event_id = 0) event_setup(list, event_id) @event = $game_map.events[event_id] endendand then you can change your condition to this:
    Code:
    $game_player.x == @event.x && $game_player.y == @event.y
    Also, if you're using this in the script line of a Conditional Branch statement (which was my intention above), you don't include the if word.
  7. Ah, very nice. I wouldn't have thought to create the class variable and just use that as a reference. I used the @event_I'd. They both work great for now. I'm not having an issue with it right now, but only thing that I'm afraid of is overloading the map with these events. However, that's a whole different problem. This fixes the issue I was having for now. TYVM
  8. That's why you have a Wait in there. Even a 15 frame wait would check it 4 times per second.
  9. Weeell. It works but so many events it lags out pretty badly. I tried adding all holes on the current map to a 2D array to compare players position with instead of using events. This works except its too slow to cycle through all the array elements and I can be standing on one of the latter array element positions and it takes a couple seconds to get to that one in the 2D array to compare my position to.
  10. Okay then ... all these events - are they doing exactly the same thing? If they are, you could get rid of them all, then use a region tag to draw on the locations where you want them to trigger.

    Then add ONE parallel process event that does this:

    Wait 10 FramesConditional Branch: $game_player.region_id == n do stuffBranch Endwhere n is the region id.It should definitely not take "a couple of seconds" for it to cycle through even a few hundred array items. I suspect you've got something in there that's slowing things down.
  11. Does it make a difference if the array cycle is ran in a map event as opposed to writing an actual class for it and calling on it from there? Reason being I could use region tags but the project is already region tag heavy and I'd like to reserve as many as I can for other purposes. I'm wondering if 63 regions will even be enough for what we're using it for lol.
  12. If they're all doing the same thing, you only need to use one region tag.


    Writing a script would probably not be much faster.


    Show us one of the events - specifically the script call - that seems to be taking so long to return anything.
  13. I'm not sure I understand your question but if you want your PCs (player character) to jump onto a tile with a "hole" graphic and then something else happens, I have a simple event for that.

    EtcXp74.png

    I have a party of 3 when this event happens, so all of them will jump at the same time using that script "<move character: -X>"

    Please let me know if I got your question wrong.
  14. Well I was referring to when the player can manually jump and they jump onto an event themselves. I went ahead with the region ID thing for the time being cause I couldn't find a good way to code it.