KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
282
Reaction score
33
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,357
Reaction score
1,642
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
282
Reaction score
33
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,848
Reaction score
1,463
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
282
Reaction score
33
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,848
Reaction score
1,463
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
897
Reaction score
5,410
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
282
Reaction score
33
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
897
Reaction score
5,410
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
282
Reaction score
33
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,357
Reaction score
1,642
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
282
Reaction score
33
First Language
Spanish
Primarily Uses
RMMV
Nice! Thank you! It certainly feels better now!
 

Mix3rn

Villager
Member
Joined
Mar 1, 2017
Messages
8
Reaction score
0
First Language
Norwegian
Primarily Uses
RMMV
Hi. Is it possible to use this script without using a projectile graphic ? I dont want to use any image file for the projectile.

EDIT: Getting this error message (Thinking incompitability with my other plugins,,)
"SceneManager._scene._spriteset.createProjectile is not a function"
 
Last edited:

Mix3rn

Villager
Member
Joined
Mar 1, 2017
Messages
8
Reaction score
0
First Language
Norwegian
Primarily Uses
RMMV
Just use a blank.png. :LZSwink:
Nah.. Getting "SceneManager._scene._spriteset.createProjectile is not a function"
So Im thinking that spawning a projectile sprite causes incompitability with my other plugins ?
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
897
Reaction score
5,410
First Language
Absurdism
Primarily Uses
RMMZ
There's an easy way to test that, disable all of your other plugins then see what results you get. Enable them one at a time until you start getting the error again.
 

Mix3rn

Villager
Member
Joined
Mar 1, 2017
Messages
8
Reaction score
0
First Language
Norwegian
Primarily Uses
RMMV
There's an easy way to test that, disable all of your other plugins then see what results you get. Enable them one at a time until you start getting the error again.
Yes. Its my only other plugin.
How to manually create the SceneManager._scene._spriteset.createProjectile function ?
Or edit galvs script to accept no projectile image.
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
897
Reaction score
5,410
First Language
Absurdism
Primarily Uses
RMMZ
No real need it does accept blank png files (it literally doesn't care about the content of the png), you've probably just entered it incorrectly. Try making a png that's blank but with the exact same name as one of the demo ones, then just copy that demo command. If that doesn't work, you'll likely want to provide screenshots of your plugin/event setup so people can troubleshoot for you.
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
282
Reaction score
33
First Language
Spanish
Primarily Uses
RMMV
I've noticed a weird bug when projectiles get triggered by events that aren't currently on the map(turn off by self switch etc) Did someone else experience this issue?
 

Latest Threads

Latest Profile Posts

Ami
tomorrow is the finale of my Endurance
2dfloor.png
What a fun tileset I've got here so far!
Minecraft Tiles, Maid Day, Custom Menu, Retry at GameOver, Save in Appdata | RPG Maker News #36

side view special bust.png
Reworking the art for the 'special busts' in important game dialogue. Potentially replacing the more 'dead-on' look of the original:
original.png

Forum statistics

Threads
111,263
Messages
1,059,683
Members
144,547
Latest member
Chaotic_Nyoom
Top