Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Shooting system in rm2k
« previous next »
  • Print
Pages: 1 [2]

Author Topic: Shooting system in rm2k  (Read 5849 times)

Offline benjie417234

  • Member
  • Initiate
  • *
  • Posts: 74
(No subject)
« Reply #15 on: October 26, 2007, 12:23:31 AM »
Yes dragonblaze.I found about that link.it was far too unexplainable
Logged

Offline Melch

  • Member
  • Initiate
  • *
  • Posts: 23
(No subject)
« Reply #16 on: October 26, 2007, 03:01:37 AM »
well, this topic has spiked my interest....


Are you wanting it to be where you see the bullet travel across the screen (which would be more complicated) or to have it so that if you shoot left, the first thing you hit to your left is instantly hit (like a real bullet would be)?
Logged

Offline benjie417234

  • Member
  • Initiate
  • *
  • Posts: 74
(No subject)
« Reply #17 on: October 26, 2007, 03:13:56 AM »
huh?you mean you have answers to my questions?!
but you're giving me 2 choices aren't you?
well i'll ask for choice B(2)the second choice....
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
(No subject)
« Reply #18 on: October 26, 2007, 03:49:27 AM »
Lol, a lot of people answered your question, though most of the answers just weren't good enough for you.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline benjie417234

  • Member
  • Initiate
  • *
  • Posts: 74
(No subject)
« Reply #19 on: October 26, 2007, 04:06:47 AM »
i guess you're right...
Logged

Offline maximumcarnage

  • King of Fangs!
  • Initiate
  • *
  • Posts: 83
(No subject)
« Reply #20 on: October 26, 2007, 04:16:37 AM »
hmm.i think when an answer finally satisfies him...people might use this as a reference with lots of answers...i wonder why no answer satisfies him.it's already a two page thread!LOL!
Logged
Arrgh!!!I wanna kill spidey!!!

Offline Melch

  • Member
  • Initiate
  • *
  • Posts: 23
(No subject)
« Reply #21 on: October 26, 2007, 04:24:30 AM »
Quote
Originally posted by DragonBlaze
Lol, I just made a shooting battle system last week, took two days, its not that hard. Though some ideas are complicated, so you should have a good background on rm2k/3 coding. Start off by learning how to record x and y possitions for events and triggering things when their equal.

But err, in shot. When you hit the right key, generate a shot at the heros location. Move it in the dirrection that the hero is facing. Set an x and y possition equal to the bullet, and update it every .0 or .1 seconds. If the bullet x and y possition is equal to the enemy's, deal damage to the enemy.


This quote would be where to start.

Basically, to start, make a "key input process" that when you press the key you want, puts an (invis to show no bullet) event under the hero. Then, use Variable Operations to set a variable to the direction the sprite(hero) is facing. Press the Help button to see what number equals what direction.

From there, it's a whole bunch of conditions. If that variable = 1 (down) then loop the event to move down every .0 (again, no bullet so super fast is ok) sec and update a Bullet-X var and Bullet-Y var.

Change them for different directions. If that variable = 2, then move the "bullet" left, 3 = up, 4 = right.

Then, for every "mob" you have on the screen, in the mobs events, always do a check(before any of the mobs other codes) to see if their X and Y = the Bullet-X and the Bullet-Y...if both are true, then the bullet and the mob is on the same square. IE dead or damaged.

Then set a switch for Mob## to true. Under the mob's event pages, set a second page with preconditioners for if Mob## is ON, and do the damage or dead code there.
Logged

Offline benjie417234

  • Member
  • Initiate
  • *
  • Posts: 74
(No subject)
« Reply #22 on: October 26, 2007, 05:29:04 AM »
ahh..finally.thanks Melch,it was an honor.
Finally people can use this as a reference!like what maximumcarnage said.
Logged

  • Print
Pages: 1 [2]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Shooting system in rm2k
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum