MZ Galv's projectile plugin, the bullets are not heading towards the mouse

1688606200889.png

I have no idea what im doing wrong
You can't have both -1 and 'm' in that function. You need to choose one or the other.
What Aqua said - the instructions in your screenshot say "-1 for player or 'm' for mouse".
The first -1 is the start event ID and the 'm' is the target event ID. So his set up seems correct? No idea why it isn't working though. Is there a conflict and/or has the plugin been updated in a long time?
Here's the relevant script he's using. You can't have both -1 and 'm' in that function

JavaScript:
To create a projectile during the game there is a few ways. The first is to
use one of the following script calls and include the projectile settings:

     Galv.PROJ.dir(sid,dir,s,d,'img',anim,'action',[r],[t],z,pid,size);


sid     = start event id or -1 for player or 'm' for mouse pos
dir     = direction fired insead of at a target. Can be: 1,2,3,4,6,7,8,9,0
          Numbers are numpad directions. 0 for facing direction of target
s       = speed - how fast the projectile travels
d       = distance - the max number of tiles the projectile will travel
img     = graphic to use from /img/pictures/
          ANIMATED IMAGES:
          The graphic can have parenthesis that contains frames and speed.
          imageName(frames,speed)... eg: bullet(8,5)
          Have no parenthesis for the projectiles to be 1 frame
action  = actions to execute when the projectile hits a player or event.
          These actions only affect events with <projEffect> comment
          Player and event actions are separated by | symbol
          eg. playerAction|eventAction
          Actions below:
          c(x)        // run common event x
          S(x:t)      // change switch x to t (on or off)
          s(L:t)      // change self switch L to t (on or off) event only
          e           // erase event - event only
r       = list of regions projectile will hit and stop on. Blank = none
t       = list of terrains projectile will hit and stop on. Blank = none
z       = z value (leave blank to default to 3, same as characters)
          2 or less will hit characters "below character" priority
          2.1-3.9 will hit characters "same as character" priority
          (3 is same as chars. < 3 draws under & > 3 draws over chars)
          4+ will hit characters "above character" priority
pid     = an identifier number id for the projectile. Left blank it will
          default to 1. This is used for events to determine if the
          projectile will go through or contact them (more below)
size    = the distance from the center of a projectile that will cause
          a collision. Leave this blank for collision based on a point

@AquaEcho To be a little fair to the OP, I can't find instructions in the plugin for the dir() method.

There's an example function call, but searching the file for the text you posted yields no result.

Downloading the zip file from the page you linked to is version 1.1 - where did you find those instructions? Is the plugin in the master demo a different version?
@AquaEcho To be a little fair to the OP, I can't find instructions in the plugin for the dir() method.

There's an example function call, but searching the file for the text you posted yields no result.

Downloading the zip file from the page you linked to is version 1.1 - where did you find those instructions? Is the plugin in the master demo a different version?
Yes, my bad, those directions are from the MV version as I already had that on my PC and opened that file instead on accident
Yes, my bad, those directions are from the MV version as I already had that on my PC and opened that file instead on accident
Well, it's really Galv's bad, not yours - the instructions in the MZ file are really a mess. And the formatting is a bit different, it uses a string 'd4' rather than the number 4.

But yes, clearly 'm' is not an option there - you must specify a direction. It seems like the OP wants to use atTarget() instead.
Ok, seems like only the MV version of the plugin has the correct/full instructions. Thought both dir and atTarget work the same.
Well, it's really Galv's bad, not yours - the instructions in the MZ file are really a mess. And the formatting is a bit different, it uses a string 'd4' rather than the number 4.

But yes, clearly 'm' is not an option there - you must specify a direction. It seems like the OP wants to use atTarget() instead.
Well in the plugin theres a feature for premade projectiles that you can call, and in this the mouse worked but the self switches did not. I want one that goes to the cursor and turns on a self switch but it seems like none of them work strangely. Also i've pretty much tried every single way of formatting it so idk
does anyone know any other methods or fixes to this issue, otherwise ill just find a new plugin
I mean...@Galv himself posts here. If there actually is a bug you can post in the thread for the plugin
I mean...@Galv himself posts here. If there actually is a bug you can post in the thread for the plugin
seems like he doesn't respond to these things usually
seems like he doesn't respond to these things usually
He seems to respond less when it's a person using it incorrectly. I've seen him respond to actual bugs.

Please show the code you're trying to use that doesn't work - we've established that the first thing you posted is an incorrectly-formatted function call. (and the wrong function entirely for what you want to do)
He seems to respond less when it's a person using it incorrectly. I've seen him respond to actual bugs.

Please show the code you're trying to use that doesn't work - we've established that the first thing you posted is an incorrectly-formatted function call. (and the wrong function entirely for what you want to do)
i showed the code i was using and i didnt do anything wrong... i did exactly what he said and on the page there are people having the exact same problem
i showed the code i was using and i didnt do anything wrong... i did exactly what he said and on the page there are people having the exact same problem
You literally changed nothing in your code from the first post. What's the point of anyone responding if you ignore everyone?
i showed the code i was using and i didnt do anything wrong...
Not to be overly snarky, but did you miss the entirety of this thread that establishes you did do it wrong? 😛

The dir() method makes them go in a specific direction, you cannot put the mouse as an option.

You want to use atTarget() to go in a dynamically-determined direction.

Original thread: https://forums.rpgmakerweb.com/threads/galvs-projectile-plugin-the-bullets-are-not-heading-towards-the-mouse.159000/