Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How might I create a harmless event-based projectile?

This is probably a strange request, but I'd like to know if there's a simple way, using events (I'm using RMVX), to cause the hero to fire a projectile when a button is pressed while walking around normally. I don't need this projectile to actually do anything other than simply fire out from the hero, travel a few tiles forward, and vanish. I've done a bit of searching for this, but the only things that come up are threads about entire ABS systems, which I don't need. I've tried rooting through these to see if there's a simple way to do what I want, but since instructions for projectiles are intended for entire battle systems, it's difficult to find a way to get it to work. I'll continue to try figuring this out on my own as I wait for a reply, but any help would be greatly appreciated.
 
input button processing (or whatever its called)
condition branch - facing up
  show battle animation (shoot up)
condition branch - facing left
  show battle animation (shoot left)
condition branch - facing right
  show battle animation (shoot right)
condition branch - facing down
  show battle animation (shoot down)
 
RMVX doesn't have the input button processing command, does it? That's what the searches are saying, anyway, and I definitely can't find it in the program. I know there's something in the condtional branch command that's supposed to do more or less the same thing, but I can't seem to figure out how to get it to work this way.

Also, the "show battle animation" command only seems to work when in battle. I can't get it to work on the actual map, which is where I need it to.

Here's what I've been thinking: Do you think it's possible to, when a button is pressed, somehow get an event to appear in front of the hero? If I could do this, I could just set the projectile graphic for it that I need, then get it to travel a few tiles away from him and vanish. Basically, use an event as the actual projectile.
 
Alternatively to that, you can call a script in your event and set it up something like this:
For simplicity, make your event go through anything, set its standard speed and frequency to the max, and have the move route option "custom" and just have "move towards player" in there
Then anywhere on the map, have your event parallel process.
to simplify things, I'll add a screenie now, cuz I don't feel like writing all this out.
Here is my beautiful screenie (it took more time editing this in paint than it took setting up the event :P)
http://img521.imageshack.us/img521/1816/projectilesystemattempteh8.png[/img]
http://img209.imageshack.us/img209/32/p ... mpttt2.jpg[/img]
http://img174.imageshack.us/img174/8223 ... mptwr1.jpg[/img]
Keep in mind that you can make the projectile do anything you want after the graphic changes, and that the variable numbers, switch numbers and graphics are entirely up to you of course.
In the little scriptlet, Change the C and B to game controls (find them in the manual I believe) that you want, or leave them as C and B to have it work for ENTER and ESCAPE. You can also add more commands in the manner you see in the scriptlet, or remove them.
The number in $game_switches[1] is the switch number you use to trigger the event, and you can remove the last event command to only have the event happen once...Hope it helps, I find it to be a bit of a clumsy event, but it worked for me.

EDIT: That's better, I changed the file into 3 separate pictures and uploaded the 2nd and 3rd ones as jpeg because uploading was taking a bloody year. It should be pretty clear now
 
EDIT: right...stupid me, I uploaded the wrong thing, I'll re-upload it for you so you can see it properly I'll update when It's uploaded...my internet's playing up
UPDATE: look in my original post to see the new and improved picture  :thumb:
EDIT2: Since I'm waaaay too lazy to make a new 3-part picture, I'll give you quick instructions on a problem I found. Instead of putting the conditional branches for directions one after the other like so:
Code:
Conditional Branch: Player is facing down
  Do stuff
else
  >
Branch end
Conditional Branch: Player is facing up
etc...
Put them one inside the other, like so:
Code:
Conditional Branch: Player is facing down
  Do stuff
Else
  Conditional Branch: Player is facing up
    Do other stuff
  Else
    Conditinal Branch...
etc...
Otherwise, if you turn while the projectile fires, it'll fire again
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top