Galv's Map Projectiles

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
So, I've tried everything but I can't get rid of this nasty player's collider offset (I think it's Y -24). The projectile itself goes straight for the center of the sprite but the collider gets offset when I'm using Qmovement. As a result, the projectile gets triggered by the space below the player.

I've actually tried improvising and editing the source code, but as it often happens with no luck...

I believe the change should be done somewhere here?
I know I'm not the only one who's struggling with this issue, but I feel like it should have some simple solution.

Code:
Sprite_MapProjectile.prototype.checkHitPlayer = function() {
    return this._obj.sTarget != $gamePlayer && !$gamePlayer.projDodge && Galv.PROJ.dist($gamePlayer.screenX(),$gamePlayer.screenY(),this.x,this.y) < this._hitDist && this.isSameLevel($gamePlayer._priorityType);
};
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,339
Reaction score
1,617
First Language
English
Primarily Uses
RMMZ
Sorry, this plugin is designed for the default RPG Maker tile-based movement only. Pixel movement plugins will likely not work correctly with it as they change the default way characters on the map work.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
But it works just fine with normal events even though they are too using pixel movement. It's just that the player's collider gets weird Y 24 px offset.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,194
Reaction score
1,190
First Language
Dutch
Primarily Uses
RMMV
@KotoYama events arent pixelbased, they move 48 pixels (per tile) in x frames.
you can make it work with pixel movement (while there is 1 game using that).

but in order to let it work correctly, both this plugin and pixel movement plugin needs heavy editing
in order to make it work correctly (those are also in changing the commands used than default.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
@ShadowDragon Have you tested QMovements plugin? You can move events by pixels with it, and as I said they work perfectly fine with GALV Projectiles, which means it might be done for the player too. Again, I haven't noticed any issues besides the Y offset.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,194
Reaction score
1,190
First Language
Dutch
Primarily Uses
RMMV
than see if you can modify it for the player nicely, I only know the name for QMovement.
but it is possible to get them to work correctly if you know how too.
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
825
Reaction score
4,741
First Language
Absurdism
Primarily Uses
RMMZ
So, I've tried everything but I can't get rid of this nasty player's collider offset (I think it's Y -24).


<collider: circle/box, #, #, #, # + 24>

Where # is any number you like, the 4th number is what governs the Y offset. So if it's offset by -24 then just add 24 to whatever number you put in there. Though don't put the calculation in there, just the result.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
<collider: circle/box, #, #, #, # + 24>

Where # is any number you like, the 4th number is what governs the Y offset. So if it's offset by -24 then just add 24 to whatever number you put in there. Though don't put the calculation in there, just the result.
Did it work for you using GALV Projectiles?
Cause for me GALV doesn't care for Player's custom collider, so setting offset inside Q plugin doesn't help. GALV sees it as 48x48 with 24px Y offset. It can also happen if you're using a normal grid movement with sprites starting with !$
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
825
Reaction score
4,741
First Language
Absurdism
Primarily Uses
RMMZ
Yep, I've got QMovement before Galv Map Projectiles. Works great, see for yourself. :LZSwink:

I currently have my player's collider at circle, 60, 60, -3, -30 and it has no trouble impacting her. Those numbers are of course due to QSprite placing the images at a different place than a event image. Which is also something you can do if you can't get the offset to work, simply use QSprite to display the character images lower. It's also worth noting you can increase the projectile's hitbox to compensate as well.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
@ImaginaryVillain you can't really see whether the collider works properly in your game. Too mush particles :D

Try shooting a projectile in a straight line and see if it hits the player just slightly below the sprite.

I actually have tried offsetting the player's sprite by changing the RPG maker's source code but again collider is positioning inself relative to how the sprite is rendered in the game.


It's also worth noting you can increase the projectile's hitbox to compensate as well.
Again, the problem is that it hits the player BELOW, so if I increase the hitbox, which I tried, the offset will be even more noticeable.

<collider: circle/box, #, #, #, # + 24>
But this is for the event's notes, right? Can I apply it to the player? I've been using QMovement plugin settings previously to change its collider.

UPD. The difference is very subtle, but when you're playing it is way easier to dodge the bullet by moving down than moving up

@Galv UPD Lol, again, I've actually tested it in the official demo, and the same thing happens. No pixel movement. Read the UPD above to properly test it.
 
Last edited:

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,339
Reaction score
1,617
First Language
English
Primarily Uses
RMMZ
UPD. The difference is very subtle, but when you're playing it is way easier to dodge the bullet by moving down than moving up

@Galv UPD Lol, again, I've actually tested it in the official demo, and the same thing happens. No pixel movement. Read the UPD above to properly test it.

Apologies, I do not see where you said you actually tested it in the official demo and thought this was a plugin conflict issue. I could replicate the issue in the demo and found the problem. A yOffset that was applied to event collision check was left out of the player collision check.

It should be fixed in version 1.1.

EDIT: Oops, that was MZ version, we're talking MV version - I will update that too.

Updated to version 1.8
 
Last edited:

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
210
Reaction score
18
First Language
Spanish
Primarily Uses
RMMV
Nice! Thank you! It certainly feels better now!
 

Latest Threads

Latest Posts

Latest Profile Posts

Chilling out while toodling around someone's painstaking Minecraft recreation of Disneyland. It is mind-boggling and probably as close as I'll ever be to going.
>Testing with fonts change.
>Tries installing a plugin. Doesn't work.
>Tries changing the plugin commands. Doesn't work.
>Tries installing another plugin. Doesn't work.
>Changes a few more plugin commands. Doesn't work.
>Goes directly to the gamefont file and changes the src. Works.

YYEEEAAAAHHHAAAA

Perseverance is key, bois and girls.
What Reviews say on RPG Maker MZ?
Looking back at some sketches, and game design documents on my PC dated summer of 2015. I started development with the release of MZ, but in 2015, I felt a strong desire to make a game out of the blue. I remember feeling sad for no apparent reason, and all these ideas rushed into my head. Now that I think about it, since that day, everything has become easier to do on my PC . . . it’s very creepy.
Everything's going to be alright! We're all in this together. <3

Forum statistics

Threads
107,807
Messages
1,032,351
Members
139,952
Latest member
4kWave
Top