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
Nice job Galv ;-)
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
Hmm…after testing again it works :D Sorry for spamming xD
Nice work, looks pretty *.*
How did you repair it? I have this error too
Could you please explain how you were able to fix this? I’ve been having the same problem.
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)
Not at the moment, no. Will add to my to-do list when I enhance this in a few weeks or so
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
Updated to 1.1 with a bug fix to normal Switch changing
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.
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.
Is it possible to set a different key to control player based projectiles e.g. spacebar or v?
I recommend asking in an rpgmaker forum. This plugin creates projectiles and doesn’t add or change any default key presses for anything.
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 :)
Ahh dang, no at the moment. Will add to my to-do list when I eventually get around to improving on this
Any update on this function? My character is a bit taller then the normal ones, he looks like he is shooting.. from .. the … dick… Lol
No sorry, no update yet.
Really loving this script Galv, it’s amazing! Just wondering if you were ever able to get around to adding the x offset functionality? I’m trying to make a space shooter and I’m going to be making weapon upgrade that allow you to fire multiple projectiles at once, but from different x positions.
Thanks for all your great work!
Unfortunately I didn’t implement an x offset functionality, sorry.
No worries! I know it was quite a while ago and you’ve got a lot on your plate. Figured I’d try asking anyway.
Keep up the great work!
I was just going through your site and noticed you have a full space invaders plug-in. I was using this script to make my own space invaders game. Whoops! I’ll use that plug-in instead!
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?
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
I accidentally used a comma instead of a colon in the self-switch activation setup. Dumb mistake =/
Thanks for the reply!
How i stop the projectiles? i try to make a cutscene where event shot for a few second and stop shoting then
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.
Sometimes projectle goes through event with comment for some reason..
This isn’t enough information for me to be able to reproduce the bug to help you.
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)’,,,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)
Also, it seems it happens only with moving events.
It might be that it is detecting the event on the tile it is moving to. It currently detects tile-based collision
I see. Thanks!
It would be interesting to add a radius option. As soon as the character is X away, the event starts firing.
This plugin allows you to create projectiles from event script calls. Adding a radius option could be done with eventing or with the help of another plugin (https://galvs-scripts.com/2016/08/01/mv-event-detectors/ might be of interest)
I tried with the event detector and event sensor, with no success.
I solved the problem with MOG_EventSensor.
Thanks for this. You are awesome. You made my game possible with this.
Is it possible to “aim” with the cursor and not looking with the character?
Not at the moment but i want to add that one day
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
I’m real busy at the moment but when I get time I will look into that
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 :)
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 :)
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.
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/
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?
Thanks for letting me know, it was actually a typo in my code causing the bug. Grab version 1.5 and let me know if any issues
Thanks for the quick response! It works perfectly! Keep It up! Your scrips are the best!
Hi there, I’m wondering if this bug exists again as I am having the same problem – common event not running, although from what I can tell everything is as it should be. I’m using version 1.7
Just to clarify on the above, the projectile is working as intended, it’s just not playing the common event when it hits my player.
If you can replicate this issue in the demo (double checking you are using the correct code) I will look into this
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?
One day I will look into real positioning and update it when I get free time.
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.
Hey Galv, is it possible to make the target with hit with projectile get erased and run common event at the same time?
Yes, you could erase it in the common event
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.
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
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.
Sorry, I haven’t implemented hit boxes for the project at this time
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.
It’s not something I had in mind when I made the plugin, sorry.
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.
That does sound wierd. I don’t suppose you can replicate this in the plugin’s demo?
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?
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
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
Is it possible to set two actions, if i hit an enemy? Like set a switch and a common event?
Thanks for you time
EDIT: Explanation: I would like to recognize with a switch the weapon with which the opponent was hit and with the common event to calculate the damage.
You could flip the switch in the common event itself.
Can you make a Conditional Branch to check the PID? So Bullet 1 would to something different than Bullet 2?
I don’t believe I incorporated that, sorry.
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!
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.
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.
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
do thing 5
Something like that. Or is there some other way to achieve this? These would all be projectiles fired from the player, not other events.
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.
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.
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
Does it have examples in the demo?
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.
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.
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:
– 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!
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).
Hello! This plugin will be ported for MZ?
Yes, eventually. :)
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?
The MV version has a plugin option for you to set the tile size to whatever you are using, yes.
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?
I don’t know what the FPLE is. Have you activated the plugin in your plugin list?
This is First Person Labyrint Explorer, allow 3d levels in RPG maker. Of course, I activated, otherwise I would not have seen this error.
Sorry, you will have to ask the FPLE plugin creator about the conflict.
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(
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.
On second thought, I figured out.
Sorry for the questions, and this what I need.
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.
I cannot replicate this in the demo. You might need to check for plugin incompatibilities?
Oh, thanks for quick reply. This bug happens in your demo. I recorded a video for this: https://www.youtube.com/watch?v=jp5-IgtonKY&feature=youtu.be
you can see as I keep pressing arrow buttons in the menu screen, the projectile from the character changes its original direction once I quit from the menu screen.
Ah, I see – pressing directions in the menu. Thanks for this, it’s very helpful – adding to my list to fix.
I also look forward to the fix for projectiles changing direction after menu presses.
Is there a way to pause projectiles in their place?
Just made a workaround to have projectiles just move through the player when they are interacting with something, so you don’t get killed while examining a door, etc.
Here’s how I’ve used your plugin for my game if you’re curious.
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.
How do you create the player’s projectiles? Can you not use eventing?
Has some form of autofire button for the player’s projectiles? Like holding down the Z key?
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.
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.
There is, but I don’t plan to update the plugin for it. You can also do manual ones inside common events to give you more
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.
Sorry, I don’t do compatibility updates for this one
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
Sorry, I don’t do compatibility updates for this one
Should have known, again, sorry to bother ya
Is this free?
Yes, this one is free to use in all projects including commercial – with credit. Thanks.
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?
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:
Which would turn switch 24 on.
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.
Unfortunately there’s no quick fix – I need to go in and try to solve it when I have time.
Alright then, thank you regardless, pooking forward to your future work.
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
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.
Ah, yeah, thanks for telling me. Not sure when I can get to trying to solve that.
Is there a way to shoot projectile in certain degrees other than every 45 degrees / position of the cursor?
Is there a way to shoot projectiles in certain degrees? (other than every 45 degrees or mouse position)
Sorry, no – apart from creating a target for the projectile to go toward.
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)
Is it possible for me to destroy the enemy’s bullet with the player’s shot?
I didn’t implement collisions between projectiles, sorry.
Is it possible to have projectiles shoot from a follower?
No, sorry – it can only do what’s in the plugin instructions.
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?
You can only do what is in the plugin instructions, sorry.