How to implement a simple projectile system?

So with Vexed's Horror City Battler Archive Content I'm finally able to make the player shoot at zombies.
Pressing the Spacebar now plays the shooting animation and all looks great, however there's still no projectile flying around. What's the best and most vanilla way to implement a simple "bullet"?


I've already implemented an invisible event that'll start moving away from the player after firing but soon realized that "event touching another event" isn't a valid trigger option. I also want something different to happen whenever the player talks to a zombie and zombies should have custom movement parts (so the zombie events can't have anything related to projectile processing).


Any ideas?
basically you'll need a parallel process comparing the coordinates of the bullet event with the coordinates of other events.

or you'll have to look for an ABS-type plugin that changes the entire battlemechanics
basically you'll need a parallel process comparing the coordinates of the bullet event with the coordinates of other events.
But wouldn't this require to declare and update two variables (X,Y) for every zombie event? On a larger map with, let's say 10 zombies, this would already fill an entire variables-page... Or am I just missing a simpler approach?

So far I've tried to avoid ABS plugins as they tend to change so much more and can be pretty difficult to set up.
Maybe this could help you:
Why not use Galv's Map Projectiles script?
two variables (X,Y) for every zombie event?
not automatically, there are other ways depending on how you wish to handle this

you can test before you move the projectile and use get location info command on the coordinate the projectile will move to. It will give you the ID of an event on that position or zero if there is no event

and there are a number of other ways like reusing variables
alright thanks for all the answers, guys!

you can test before you move the projectile and use get location info command on the coordinate the projectile will move to. It will give you the ID of an event on that position or zero if there is no event

This one did the job. Once the player shoots the projectile, it checks the tile adjacent to the direction of movement for an Event ID. If it's zero (== no event) it keeps moving, if it's not then a variable is set to the specific event ID. Now each zombie has a different value of that variable as a condition and making use of higher page priorities and self switches, only the zombie that actually got hit by the projectile "dies".
Additionally I've added a movement check, to see if the projectile has moved at all even when the Event ID returns 0. That is to prevent an infinite loop if the projectile reaches the maps end without hitting anything.

It's far from perfect but all I need for now. Thanks again for the responses!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-implement-a-simple-projectile-system.123098/