MV Map Projectiles

FEATURES
Create projectiles that can interact with player and events using script calls.
These projectiles can be fired from the player or an event and set to shoot in a direction, at a target or toward the mouse position. Settings can be used to control which projectiles will hit or run an action on other events, which terrain tag or region id tiles block them, different actions they will do when then hit the player or an event and more.

VERSION 1.8 – RPG Maker MV
Download Plugin file
Download Demo

143 thoughts on “MV Map Projectiles

  1. Nico says:

    Nice job Galv ;-)

  2. StyX says:

    I get always the same error. In a new project, too.

    ‘Cannot read property ‘_erased’ of undefined
    :(
    Even if i copy your events in my project or a new one

  3. Kaosporpio says:

    Is there a way to freeze the motion of projectiles?
    I use own menus and i need to pause the game
    (Sorry for my English)

    • Galv says:

      Not at the moment, no. Will add to my to-do list when I enhance this in a few weeks or so

    • BarkingDroid says:

      Sorry for necro Posting, I just started a project with this plugin and came back to see if there was a simpler way to do a few things im planning and I was wondering the same thing early on, in the end I called the options menu, im not at my PC right now so forgive me others who are wondering this if im incorrect, but I used SceneManager.push(Scene_Options) I believe, and this paused them

  4. Galv says:

    Updated to 1.1 with a bug fix to normal Switch changing

  5. Vectorinox says:

    I tried something like; player shots projectile, it hits an event, then it runs a common event. Apparently, the common event runs for the projectile, not the event being hit. Wouldn’t it be better to make the common event runs for the event being hit? That way you can just put erase event or self-switch inside the common event being run, and give more flexibility for more options.

    • Galv says:

      I didn’t think to investigate how I could have a common event act as though it was run inside an event. I agree that would have been better.

  6. Junior says:

    Is it possible to set a different key to control player based projectiles e.g. spacebar or v?

    • Galv says:

      I recommend asking in an rpgmaker forum. This plugin creates projectiles and doesn’t add or change any default key presses for anything.

  7. Hi Galv! Great plugin.

    Is is possible to have the X offset too? I want arrows to be shot from side walls. But since the side walls have collision, I need to put the event next to it, but the projectile is shooting from the middle of the event. I’d like to put the offset a few pixels to the side. Something like:

    // x offset for where projectiles start from.

    Thank you :)

  8. ZeronFX says:

    Hey there! This plugin is working great, except when I try to shoot an event with a player-originating bullet, I get this error:

    TypeError: Cannot read property ‘toUpperCase’ of undefined

    The bullet is supposed to be setting off an event’s Self Switch A, any idea what I’m doing wrong?

    • Galv says:

      Compare your setup to the demo and make sure it’s correct. I will need to see screenshots of your setup before I can help

      • ZeronFX says:

        I accidentally used a comma instead of a colon in the self-switch activation setup. Dumb mistake =/

        Thanks for the reply!

  9. AFLY says:

    How i stop the projectiles? i try to make a cutscene where event shot for a few second and stop shoting then

    • Galv says:

      I don’t understand what you mean. It depends how you are making the projectiles… if you are using parallel process then you’d stop the parallel process.

  10. Yulia says:

    Sometimes projectle goes through event with comment for some reason..

    • Galv says:

      This isn’t enough information for me to be able to reproduce the bug to help you.

      • Yulia says:

        I made a common event to shoot projectiles: If Input.isTriggered(‘ok’) run script Galv.PROJ.dir(-1,0,8,8,’bullet0′,1,’|s(A:on)’,[1],[1],3,1);
        But sometimes projectiles fly through an event with projEffect comment without triggering selfswitch A.
        (Sorry, English isn’t my first language, hope you’ll understand)

      • Yulia says:

        Also, it seems it happens only with moving events.

      • Galv says:

        It might be that it is detecting the event on the tile it is moving to. It currently detects tile-based collision

      • Yulia says:

        I see. Thanks!

  11. Jackson says:

    It would be interesting to add a radius option. As soon as the character is X away, the event starts firing.

  12. cyncym says:

    Thanks for this. You are awesome. You made my game possible with this.

  13. cyncym says:

    Is it possible to “aim” with the cursor and not looking with the character?

  14. StyX92 says:

    Hey galv, i try to create a shotgun. I want that the character shots one bullet i the direction where your mouse is. Thats no problem, but i want to spree / split the bullet. They should fly like that: \ | /
    This will work if you dont use the mouse. But if i use it, I cant define the other two bullets. I hope you know what i mean :D

  15. Hi Galv, Love your plugin! :)

    I’m wondering if ‘|e’ (erase event) could be triggerd in a event-to-event scenario?

    Or mabye a Script call: $gameEvent._projEffect = true/false;
    Could be added?

    At the moment it doesn’t seem to be a way to turn off
    the projectiles when a event is hit by another event.
    I could be wrong, but it would be a great feature anyway :)

    • Galv says:

      I do not know what you mean here. This plugin doesn’t have anything to do with event-to-event. It is projectiles that can contact player or events.

      You can set projectile action to erase events. In the plugin help there is an example “(EXAMPLE 1) of a projectile that can do that.

      • Sorry, my english isn’t the best and I’m preatty new to RM,
        it’s probably me overlooking something obvious.

        Just to clarify: The projectile is setup to fire from an event onto a moving target (Basic tower defense). So the player isn’t really involved. Error occurs when ‘e’ (erase) is added to the target parameter.

        But don’t worry about it, I’ll give it another try, hopefully I figure it out :)

      • Liam Cullen (cullenofliams) says:

        HI Galv, i am struggling to get it to work using the example 1 text, i dont know how to execute the common event via a plug in, im a 6 day user on RPG so probally trying to run before i can walk but figured most of it out just trying to get into common events because that seems to be where the magic happens and id like to be able to make event disapear as i am trying to do a horror where when they catch you it runs the pre made event of them killing you and it going to game over, but would like to introduce projectile mechanics to make it more immersive game play so i can capture the feeling of fight or flight better. so far its a run from everything game.

        any resources, pointers, refferences e.g. would be greatly appreciated.

      • Galv says:

        I think the help file that you can access through RPG Maker might help. And anything you have issues with, I recommend asking in a forum like: https://forums.rpgmakerweb.com/

  16. Kenshiro says:

    I’ve been trying to activate a common event when the player gets hit but for some reason it’s not working. I compared my proyect with the demo and I found that in the demo when the blue bullet hits you it should be appearing and exclamation globe over the player triggered by the commun event #2, but it’s not happening. I am I the only one with this problem?

  17. recontooth says:

    Hey Galv, great plugin! I’m currently using it to overhaul the combat in a survival horror game I’m working on, to allow the player to shoot at zombies rather than engage in turn-based combat with them. I’ve noticed that sometimes, when a “zombie” event is moving from one tile to another, the projectile won’t hot the zombie event, though it looks like it should be. Would it be possible to implement pixel-based collision in a later version of the plugin rather than tile-based collision?

  18. ArcheoFox says:

    Hi Galv. Thank you for this wonderful another plugin! I have the same query as Recontooth, it would be great to implement a pixel-based collision. Thank you in advance.

  19. gundriveth says:

    Hey Galv, is it possible to make the target with hit with projectile get erased and run common event at the same time?
    Thank you!

    • Galv says:

      Yes, you could erase it in the common event

      • gundriveth says:

        Hello,
        sorry the previous question is not clear enough, what I want to do is:
        how to make an enemy(target) that have HP, so the target needs 5 or 10 shots from the projectile to bring it down.

        If I use ‘e’, the target will instantly be erased/defeated on the first hit.
        Thank you

      • BarkingDroid says:

        hmmm no reply button on the question clarification so Ill hit it here, hopefully you figured this out by now, its simple, but in case anyone has a similar question or your still looking for it, It’s simple. I use this and I flip the various self switches to indicate damage values and check which are on and add to a damage counter and then flip the switch back off making it ready to count damage again.

        so @gundriveth and anyone else who might of wondered the same, yes you can make enemy targets on the map have HP, and not only that but you can make them weaker and stronger against certain attacks by varying which self switches your projectiles flip

  20. Alejandro Torres Hernandez says:

    Hi Galv, the plugin is amazing, I love it.
    I’m wondering if it’s possible to use big projectiles? Because when I use an image of “144 x 144” the projectile doesn’t hit the player very well. It’s mean, it hit the player but just when the center of the image collide with the player.

    Thanks.

  21. Josh says:

    Hey Galv, amazing work, as always. One quick question, is it possible to turn on a self switch from the event that fired the shot? Like if the enemy shoots and hits the player, the enemy can run an event for a taunt or something. Thank you for your help, Galv.

  22. nick says:

    I noticed a bug, im not sure what is exactly causing it, but im using this plugin in conjunction with your event proximity plugin and was having some really weird issues. So I was just testing and using a event that was also a light source which used the Thomas Edison plugin and was finding that the projectiles would only fire on the events using the light source. At first I thought it must have something to do with the Thomas Edison plugin, but the projectiles would fire when the Thomas Edison plugin was off. As I started to deconstruct the problem I eventually found that I needed to have a comment (it can be blank) before the script for the projectiles for it to work. Its a really weird issue, but thought you should look into it.

  23. Pac says:

    I tried to shoot a projectile from THIS EVENT in a specific direction.
    But with the Proj.dir command the ‘0’ as sid dont work.

    I made a demonstration with your demo.
    Can you have a look?

    https://mega.nz/#!G0sE3YyD!iRJKLaJOiWYO9mhp5JvfBFzkH3pCaWqWMfF5-jXAy4o

    • Galv says:

      I haven’t downloaded your project, but do you have the latest projectile plugin?
      * sid = start event id or -1 for player or ‘m’ for mouse pos

      0 isn’t an event id

  24. Pac says:

    Yes i have the latest one.

    I have spawned an enemy with your event spawner plugin, and i dont know which id the spawned enemy have.
    I tried to set the id into a variable and get this variable into the scriptcall, but it dont work, if the enemy spawns.

    But now a find a way. Set this.eventId() as sid and it works :D

  25. GraysonxD says:

    Hey galv!
    Is it possible to set two actions, if i hit an enemy? Like set a switch and a common event?
    Thanks for you time

  26. katty says:

    Can you make a Conditional Branch to check the PID? So Bullet 1 would to something different than Bullet 2?

  27. katty says:

    Well,I bypass the Conditional Branch by making projectiles with ‘|S(x:on),s(A:on)’ who then activate the right event page for it.
    Thanks for your answer, amazing plugin!

  28. footaay says:

    Really love the script btw. Was just wondering if there was a way to change the tile size with a script call or something?? Would solve a ton of my issues being able to change that during the game.

    • Galv says:

      No, that setting in this plugin is meant to be set to your game’s tile size for position calculation purposes (48 is default,) Changing it would mean the projectiles wouldn’t be in the right spot on the map.

  29. James Devain says:

    Hi Galv, and Merry Christmas! (If that’s your thing, that is…)

    I have a question. Since there are only 4 self switches, how could I have an event react differently to five different types of projectiles? I was thinking, is there some way to use the projectile identifier in a conditional script call, like:

    If pid = 1
    do thing 1
    elseif pid = 2
    do thing 2
    elseif pid = 3
    do thing 3
    elseif pid = 4
    do thing 4
    else
    do thing 5
    end

    Something like that. Or is there some other way to achieve this? These would all be projectiles fired from the player, not other events.

    Thanks!

    • Galv says:

      I believe someone has written a plugin that lets you use more self switches – that might be something to look into to see if it works.

      • James Devain says:

        Thanks for the super-fast reply. I know Yanfly has one, and I already tried it, but it doesn’t seem to work with your plugin. Also, I just noticed Katty’s comment a couple above mine, so I see that that’s not something provided for. I should have scanned all the comments before bugging you about it, haha.

        Thanks!

  30. drew says:

    How do I setup quickDir() so that and event can spawn a projectile at itself without having to specifically enter it’s event id?
    I’ve tried quickDir(1, this), but that doesn’t seem to be working

  31. Riley says:

    I’m having trouble with spawning my projectiles when I am firing an event. I set up a trigger to fire a projectile from an event object. However no event object is visible but I know the event is firing. It only appears when the event target(sid) is -1 aka the GamePlayer. Any advice will be wonderful.

    • Galv says:

      I don’t understand what is happening (or not happening?). Test what you are trying to do in the demo and check the script calls and event id’s carefully. This might rule out any plugin conflicts.

  32. Walric says:

    Hello Galv,

    first off, thank you so much for your plugins. They help tremendously in making my game become reality.

    Unfortunately I (most likely) encountered an issue with this plugin when using sprites with the ! prefix that disables the Y-shifting. In that case bullets will pass through the player, if directly standing to the left or right side of the shooting event.

    Here’s a Screenshot:

    Information:
    – reproduced in the demo file
    – except left and right, any other angle works as expected
    – only affects player character with ! suffix sprites, events with the ! suffix seem to work
    – setting the bullet size to >25 results in hitting the player, but it’s unreliable since some bullets will still pass through when walking towards/away from the shooting event
    – played around with to counter the y-shifting, but this again is unreliable, even more than the former method

    I hope I didn’t miss any obvious way of fixing this issue, as not to waste your time.

    Thank you and have a nice day!

    • Galv says:

      Thanks for the report – I appreciate the detail you went into. When I get time I will try and work out what’s happening (very busy of late, not sure when I’ll be able to look).

  33. TwisterjAM says:

    Hello! This plugin will be ported for MZ?

  34. Riley says:

    Does this plugin know how to deal with non-standard tile sizes such as 32 by 32 and 64 by 64 , and in addition to the standard 48 by 48?

  35. id0 says:

    Hello. I’m trying to use plugin with the FPLE, but have a error:
    SceneManager._scene._spriteset.createProjectile is not a function.
    Is there any way to fix it of something?

    • Galv says:

      I don’t know what the FPLE is. Have you activated the plugin in your plugin list?

      • id0 says:

        This is First Person Labyrint Explorer, allow 3d levels in RPG maker. Of course, I activated, otherwise I would not have seen this error.

      • Galv says:

        Sorry, you will have to ask the FPLE plugin creator about the conflict.

      • id0 says:

        He is no longer support fple. No matter. I already found another solution.
        And thanks for great plugins by the way. I’m using char animation and other your scipts in all makers. :) Too bad your pixel movement not support mouse(

  36. ZXZ Gamers says:

    I really like it, but when the laser beam targets the player, it comes like this “!”, so how I can let the player damage when he loses hp?
    For example, when the laser targets the player, your hp reduce -45.

  37. ymn says:

    Hi, thanks for the great plugin, but I am suffering from a bug. The projectile changes its original direction if I enter the menu and then exit the menu.

  38. Blackthorn says:

    I also look forward to the fix for projectiles changing direction after menu presses.

  39. Blackthorn says:

    Is there a way to pause projectiles in their place?

  40. Fpix says:

    Awesome Plugin! Is there any way to trigger a common event upon the launch of a player projectile whether it hits or misses? I’m trying to create an ammo system.

  41. XCIV says:

    Has some form of autofire button for the player’s projectiles? Like holding down the Z key?

    • Galv says:

      I recommend asking in a forum. You use eventing to control the shooting so you’ll need to work out how to use eventing to do that.

  42. Dangles McNasty says:

    Is there anyway to add additional premade projectiles? 20 seems like a lot but it’s really not if you add stuff like bombs that shoot out in 8 directions, which is 8 premades gone already. I’m gonna mess with the js for now and add more and hope nothing bad happens lol.

  43. men10doh2 says:

    Any way to fix the plugin to work with MV3d? It “works” it just doesn’t show images or animations or activate events.
    Though you’re probably not working on the mv version anymore, if so sorry to bother you sir.

  44. men10doh2 says:

    Is it possible to fix this plugin for MV3D? It doesn’t crash, it just doesn’t show Images or Animations and doesn’t activate events.
    Sorry to bother you sir

  45. Jackson says:

    Is this free?

  46. Some guy says:

    Hey, apologies if this should be ovious but I checked in the demo and there didn’t appear to be any examples of this. How do I make it so that an event hit by a bullet activates a switch instead of disappearing? Or at the very least, activates a switch?

    Thanks!

    • Galv says:

      You need to change the action of the projectile. I didn’t put in any examples in the demo, but check out the plugin description and it has a few examples written out with what they mean.

      The action for a switch is, for example:
      S(24:on)
      Which would turn switch 24 on.

  47. Robo_tnik says:

    Hey Galv, this plugin is amazing and does wonders for overworld puzzles. One problem i have that puts a dent in them is the fact that if the character moves, opens the menu screen, and then exits, the projectile will change its direction. Is there any quick fix for it? A certain line of code that can be added to the plugin. I would really appreciate it but ik you’re a busy guy, so thank you for offering us this plugin regardless.

  48. ShanDsparil says:

    Nice , very good plug-in. I try use it with MV3D plugin , but i dont see projectiles in 3D , but hits works corectly. Does anyone know why, how fix it. Thank you

  49. Blackthorn says:

    Another weird bug. When you add an animation when being hit by a projectile, and then pause/unpause, the projectile plays the hit event again. Kind of reminds of the pause glitch in old Megamall games.

  50. ilya says:

    Is there a way to shoot projectile in certain degrees other than every 45 degrees / position of the cursor?

  51. 7dimterminal30cie1 says:

    Is there a way to shoot projectiles in certain degrees? (other than every 45 degrees or mouse position)

    • Galv says:

      Sorry, no – apart from creating a target for the projectile to go toward.

      • 7dimterminal30cie1 says:

        Ahh okay, I might try creating target events to emulate the angles, thank you (also sorry about the another comment, I somehow messed up and commented twice)

  52. XCIV says:

    Is it possible for me to destroy the enemy’s bullet with the player’s shot?

  53. Blackthorn says:

    Is it possible to have projectiles shoot from a follower?

  54. Dangles says:

    Is there anyway to have the projectile draw over everything like it has priority 3 but still allow it to contact events that are the same as the player?

  55. Hellfax says:

    Projectiles are invisible when fired from player and don’t activate projectile effect on hitting a event. When fired from an event, they don’t work at all. I’m replicated exactly what the demo shows. I’m not sure I can send a copy of my workspace since the game im working on is a private friend group thing.

  56. ijsfrisk says:

    Hey Galv, thank you so much for making these plugins.

    I ran into an issue where the projectiles do not trigger common events when colliding with the player (they do when they collide with events).

    I solved it by changing line 483 from
    “if (!target._projEffects) return;”
    into
    “if (target != $gamePlayer && !target._projEffects) return;”
    I guess the player character was not properly setup for projEffects in my existing game? I could not reproduce this in the demo file.

  57. Lachezar Y. says:

    Hey galv, I’ve had a problem with the plugin. I’ve tried to use your demo as a refrence and when I try to press space to execute the command I get an error:

    action.split is not a function

    Could you have any idea what that’s about?

    • Galv says:

      Here’s some error trapping ideas:

      Errors Using Plugins

      First thought is, you added the plugin and didn’t start a new game in your project. Second is something incorrect in your setup. Not 100% sure.

      • Lachezar Y. says:

        Thank you for the reply! Turns out i just missed to fill in something in the setup, as you said. But I’ll be sure to use the page you linked if I come accross errors again

Leave a reply to ZXZ Gamers Cancel reply