MV eventing a falling rock while on jump

Hello everyone. I found that if I allow permanent jump for the player (GALV Jump plugin, but anyway it happens with a jump common event too), i can't regularly build a falling stone collision event. If it just walks, everything is smooth. But if the stone touches the player while he's jumping, then no collision happen, no matter if I click on "event touch" or "player touch" or if I event with variables to synch coordinates for event and players. Player just won't exist during a jump, making useless the Falling stone trap (he could jump everywhere and won't be damaged). How can I solve this?
Up?
Not a plugin solution, but since you mentioned you tried eventing also...if you just make the player jump with a normal event jump move route (and turn of "wait for completion"(?)), then it should work, I tink. Just take the player's and rock's x,y-screen-coordinates and make a conditional branch to check the "hitbox" if they are colliding.
unfortunately that doesn't work either
Hmmm, I can at least get a simple collision working while the player is jumping in the air. How did you set up the "hitbox"?
just "event touch" check. If if work checking with coordinates and variables, it won't work well because the map is very big (100x100) and full of falling rocks
Yeah, a plugin would probably be best for that. You could use just the two variables for multiple events, but I have no idea if there starts to be some kind of performance issue.
Yeah, a plugin would probably be best for that. You could use just the two variables for multiple events, but I have no idea if there starts to be some kind of performance issue.
This script will come handy as it allows you to use Self Variables on events ! Allowing to use the same variables for every falling rocks.
@joket

I don't think there'll be a really massive performance issue without a plugin, both would check the same stuff anyway. But you could always try to request a JS plugin or seek for one. Even though in theory it should be do-able with eventing.
This script will come handy as it allows you to use Self Variables on events ! Allowing to use the same variables for every falling rocks.
@joket

I don't think there'll be a really massive performance issue without a plugin, both would check the same stuff anyway. But you could always try to request a JS plugin or seek for one. Even though in theory it should be do-able with eventing.

I wrote my previous post kind of confusingly, the point was that I think they can use the same variables even without a plugin. Or will that cause some kind of problem?
I wrote my previous post kind of confusingly, the point was that I think they can use the same variables even without a plugin. Or will that cause some kind of problem?
Variables are global by default. Depending on what he wants to do exactly, it might cause some issues. The variables can't have the value of each event's coordinates at the same time, and by the time where one of the event would set the variable then check the variable value, another duplicated event might have replaced the variable's value... Self-variable are way better for this stuff, but sadly enough the RTP doesn't provide it. Though Yanfly made a pretty easy plugin allowing this.
Variables are global by default. Depending on what he wants to do exactly, it might cause some issues. The variables can't have the value of each event's coordinates at the same time, and by the time where one of the event would set the variable then check the variable value, another duplicated event might have replaced the variable's value... Self-variable are way better for this stuff, but sadly enough the RTP doesn't provide it. Though Yanfly made a pretty easy plugin doing this.

Ok, I just thought that if you write the event so that you control variables 1 and 2 to x,y of rock A and then check that "hitbox" and then change the variables to rock B and check and so on, it should work. Since the code runs so many times per second that during the jump and collision the code runs through many times and it manages to switch the variables for every situation? But yeah, I've only done this for 1,5 months, so I have no idea what is the good way to do it.
Ok, I just thought that if you write the event so that you control variables 1 and 2 to x,y of rock A and then check that "hitbox" and then change the variables to rock B and check and so on, it should work. Since the code runs so many times per second that during the jump and collision the code runs through many times and it manages to switch the variables for every situation? But yeah, I've only done this for 1,5 months, so I have no idea what is the good way to do it.
Oh, if you were to put every check one by one in the same event it would work. But it would be only one process, and if there's alot of rocks, there might be delays... Also it might happen that the rock hit the player but nothing happens because the event was checking another rock. Don't forget that the rocks also moves during the time the event is running, and so does the player.

An optimized way would be to check where the player is to know which rock to check, and to not check rocks that are too far away from the players.

Anyway you run in a Quality VS Performance issue there, 'cause 100 events checking the 100 rocks will slower a bit the game, or even alot depending on how the events are made, and the spec of the computer. Yet checking one by one the 100 rocks in one single event, with one process will be inconsistent. Sometimes the player will get hit by a rock and nothing will happen...

EDIT : Here http://www.yanfly.moe/wiki/Event_Hitbox_Resize_(YEP)

This plugin will allow you to really resize the hitbox of your events. @joket 🙂 it should solve your problem, take a look !

Original thread: https://forums.rpgmakerweb.com/threads/eventing-a-falling-rock-while-on-jump.143753/