The Daily Click ::. Forums ::. Klik Coding Help ::. Limited Shooting
 

Post Reply  Post Oekaki 
 

Posted By Message

The DogCow



Registered
  07/07/2003
Points
  83
27th July, 2003 at 19:14:27 -

I'm attempting a perfect Megaman engine, but I need help with this. In real Megaman games, you can not shoot rapid fire (except in the early NES ones). I'm not talking about the 3 bullet on the screen at a time limit, I've got that done. I'm talking about pressing shoot really quickly 3 times and getting very close together shots. Later Megaman games don't let you do that.

The major problem is that I'm basing the engine on Daniel[Crazy_Productions]'s Megaman X engine. The way it handles the charge effect gives me some crazy results if I set the shoot events to only occur after a certain time passes (i tried sounds, animations, and counters to calculate time). Much thanks in advance to anyone who even tries to help me out.



 
---------------------------
Visit Khazm Games at www.khazm.tk
---------------------------

Kramy



Registered
  08/06/2002
Points
  1888
27th July, 2003 at 21:58:24 -

Hmm....try using a wait counter

If wait counter = 3
shooting events check out(button pressed, etc.)
then...
shoot and set wait counter to 0



Then add this event:

Every #### seconds
add 1 to wait counter

I usually set it to 0.20 seconds, but for shooting you might want to raise or lower it, depending on your weapon.

---------------------------
If you have different weapon types, add a weapon counter.....
when your character picks a weapon, set the weapon counter to a corresponding value
then add these events...

Weapon counter = 1
Every #### seconds
Add 1 to wait counter

-----Example-----
Weapon counter = 1
Every 0.50 seconds
Add 1 to wait counter

Weapon counter = 2
Every 0.25 seconds
Add 1 to wait counter

Which would make the second weapon more rapid fire.


 
Kramy

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
28th July, 2003 at 06:10:59 -

An easier way, I think, would be to use an internal flag of the main character. Then you dont need to count to three, you can just go:

+ Internal Flag 1 of Character is On
+ Every 01''00
- Set Internal Flag 1 of Character to Off

That may cause problems with the timer (i.e. if your at 3 seconds when you click, then it'll reset almost instantly)... but that can be fixed easy if your using MMF 1.5.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

The DogCow



Registered
  07/07/2003
Points
  83
28th July, 2003 at 17:10:29 -

Already tried that method (as I stated in my post). It would work if not for the way the engine handles charging a weapon. Thanks for the attempt.

Know any other ways? I have a half-assed way right now that might or might not be affected by how fast your computer is. Gonna try it on my other PC.

 
---------------------------
Visit Khazm Games at www.khazm.tk
---------------------------

mrEkli



Registered
  02/07/2002
Points
  169
28th July, 2003 at 23:49:03 -

Just disable shoot if Bullets >= 3. Just as simple as that. Put that into the shoot event.

 
[ACT Workz] http://azure.xn-1.com
[NeWKleaR Studios] http://newklear.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
29th July, 2003 at 01:37:52 -

aZuRe - He said he didn't want that style.

.....I'm not talking about the 3 bullet on the screen at a time limit, I've got that done.....

The DogCow - Maybe you should make your own engine from scratch, then you could customize it to your own will.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

mrEkli



Registered
  02/07/2002
Points
  169
29th July, 2003 at 03:05:54 -

Sorry... My bad. Read too fast.

 
[ACT Workz] http://azure.xn-1.com
[NeWKleaR Studios] http://newklear.com

The DogCow



Registered
  07/07/2003
Points
  83
30th July, 2003 at 21:19:08 -

I redid the way uncharged shots are handled (the new way is better than the original engine) and I got the timing to work now! Yippie!

Oh, and I'd love to do my own engine, but this is my first TGF project. I need to look at what someone who knows what they're doing did in order to learn. If I hadn't started using this engine, I would have never learned of the magic of the Fastloop Object.

 
---------------------------
Visit Khazm Games at www.khazm.tk
---------------------------
   

Post Reply



 



Advertisement

Worth A Click