KotoYama

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
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). 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

Regular
Regular
Joined
Oct 1, 2012
Messages
1,470
Reaction score
1,775
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
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

Realist
Regular
Joined
Oct 8, 2018
Messages
8,234
Reaction score
3,505
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
@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

Realist
Regular
Joined
Oct 8, 2018
Messages
8,234
Reaction score
3,505
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
Regular
Joined
Jun 22, 2019
Messages
1,020
Reaction score
6,231
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
<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
Regular
Joined
Jun 22, 2019
Messages
1,020
Reaction score
6,231
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
@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

Regular
Regular
Joined
Oct 1, 2012
Messages
1,470
Reaction score
1,775
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
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:

ImaginaryVillain

High Cultist of the Sporkle
Regular
Joined
Jun 22, 2019
Messages
1,020
Reaction score
6,231
First Language
Absurdism
Primarily Uses
RMMZ
Just use a blank.png. :LZSwink:
 

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
Regular
Joined
Jun 22, 2019
Messages
1,020
Reaction score
6,231
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
Regular
Joined
Jun 22, 2019
Messages
1,020
Reaction score
6,231
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

Regular
Regular
Joined
Apr 20, 2019
Messages
447
Reaction score
82
First Language
Portuguese
Primarily Uses
RMMZ
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?
 

EndlessGame

Regular
Regular
Joined
Jun 17, 2020
Messages
164
Reaction score
38
First Language
English
Primarily Uses
RMMV
What could be a reason that this plugin causes lag? This lag isn't isolated to maps with projectiles either, but a game-wide issue only when the plugin is on.
 

Latest Threads

Latest Posts

Latest Profile Posts

Me watching the game awards.

Gonzo, shut the **** up and show use some Elden Ring DLC. tumblr_422af97288e81470bb4ea56cce38e220_331927d8_500.gif
THE GAME AWARDS AHHHHHH!!!!!
I kept saying I suck at writing stories. But I can't believe I wrote one these days. Feels good now that the winged blonde girl I often share has an actual lore and plot going.
Huge breakthrough! I finally fixed the dimensions on the WEBM used in the cinematic that ends the demo and introductory segment in MC:RIS, around the one-minute mark:



(There's some audio desync because the capture is an MP4.)
Kudos to everyone making game jam games, because this month has been hell for my development time. I have made a cutscene, 2 sprites, and 1 tile.

I guess I've made conceptual progress in hammering out combat roles and having fixes to be implemented (though I haven't done that yet)

Forum statistics

Threads
136,822
Messages
1,270,416
Members
180,584
Latest member
LalaTheGhost
Top