YesNoOk
avatar

I need help with projectiles (Read 1083 times)

Started by Froz, March 28, 2012, 11:55:42 pm
Share this topic:
I need help with projectiles
#1  March 28, 2012, 11:55:42 pm
  • avatar
  • ****
    • USA
how do properly code a Reflecting Projectile like the "Aegis Reflector" by Urien or Make a projectile start with slow velocity but as time passes it speeds up?


Here's the link : http://www.mediafire.com/?gj79t5gdxs8qhyg
Re: I need help with projectiles
#2  March 29, 2012, 12:55:58 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
True reflecting projectiles are impossible except in a full game environment. Up to you if you want to do the halfass but sorta reliable version.

For speed up it depends what sort of projectile it is. Whether it's a helper or a projectile

Projectiles take an Accel parameter which works like a constant veladd

accel = 0,-1

Will make the projectile accelerate upwards

Helpers use the veladd controller. This is in the docs and you can look it up.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: I need help with projectiles
#3  March 29, 2012, 01:22:32 am
  • avatar
  • ****
    • USA
True reflecting projectiles are impossible except in a full game environment. Up to you if you want to do the halfass but sorta reliable version.

For speed up it depends what sort of projectile it is. Whether it's a helper or a projectile

Projectiles take an Accel parameter which works like a constant veladd

accel = 0,-1

Will make the projectile accelerate upwards

Helpers use the veladd controller. This is in the docs and you can look it up.

yes, i'd like to do the "half-ass" reflecting version plz :3

also, I based off of ryu's shinku hadoken to make his jupiter thunder.

but when it hits an opponent it sometimes goes to 3-5 when it should always give 5 hits.

where did i go wrong?

Spoiler, click to toggle visibilty
Last Edit: March 29, 2012, 01:32:16 am by Froz
Re: I need help with projectiles
#4  March 29, 2012, 02:11:21 am
  • ****
    • www.justnopoint.com/Masters/
My bet as to why its giving a different combo counter is because of opponents get hit collision boxes. The projectile it self may be fine and moving at slow speed like you want but it may be trying to catch up while the opponent it still in recovery frames of the get hit animation and different people will collision their characters differentely. Try the move on a large body like Hulk and a petite body like King and see the combo results and/or increase the hit pauses. The code you're working with will cause other cosmetic issues with characters that use helper projectiles as well so I'd just put in a NotHitBy on your character on the 1 or 2 frames when the character shoots the projectile out. It's cheating but who cares.
Re: I need help with projectiles
#5  March 29, 2012, 02:24:45 am
  • avatar
  • ****
    • USA
My bet as to why its giving a different combo counter is because of opponents get hit collision boxes. The projectile it self may be fine and moving at slow speed like you want but it may be trying to catch up while the opponent it still in recovery frames of the get hit animation and different people will collision their characters differentely. Try the move on a large body like Hulk and a petite body like King and see the combo results and/or increase the hit pauses. The code you're working with will cause other cosmetic issues with characters that use helper projectiles as well so I'd just put in a NotHitBy on your character on the 1 or 2 frames when the character shoots the projectile out. It's cheating but who cares.

Kamekaze's Hulk receives only one hit, and Zero-Sennin's King receives 3 hits
Re: I need help with projectiles
#6  March 29, 2012, 02:49:38 am
  • ****
    • www.justnopoint.com/Masters/
Try KFM, thats the best character to test on and generaly nets the best results :D.
Re: I need help with projectiles
#7  March 29, 2012, 03:02:43 am
  • avatar
  • ****
    • USA
same he gets 5 hits when he's close, and 3-4 at the end of the screen i'm pretty sure it's the coding itself, there's something in the code  that triggers 3-4 hits when the opponent is at the end of the screen.
Re: I need help with projectiles
#8  March 29, 2012, 03:08:06 am
  • ****
    • www.justnopoint.com/Masters/
kfm, my stuff and my others friends stuff got all 5 hits anywhere on the screen. Have you tried re-writing the projectile from scratch?
Re: I need help with projectiles
#9  March 29, 2012, 03:19:43 am
  • avatar
  • ****
    • USA
kfm, my stuff and my others friends stuff got all 5 hits anywhere on the screen. Have you tried re-writing the projectile from scratch?

yes, the third time actually, and this will be my fourth :S i'm using fighter factory 3 if that's causing the problem.
Last Edit: March 29, 2012, 03:39:58 am by Froz
Re: I need help with projectiles
#10  March 29, 2012, 03:33:32 am
  • ****
    • www.justnopoint.com/Masters/
It's definately not fighter factory, I'll personaly vouch for that. The problem is Urien mirror self because I cannot reproduce the error on other characters, even those poorly made and when I looked at the code it self is more or less a cluster fuck paste over of P.o.t.S old and new stuff *scratches head* because I could of sworn he used 1 as his HitDef triggers in projectiles like that. The key is to keep opponent on the ground and send them flying on the last hit for obvious cosmetics purposes. In this case mirror self falls right away because the HitDefs have Fall = 1 and when nulled and tested on other characters they remain on the ground throughout the 5 hits but do not fly over.

What you could try next is to see what you can do with a Projectile/Projectile and HitDefs because 1/2 the work is done for you already.
Re: I need help with projectiles
#11  March 29, 2012, 03:40:10 am
  • avatar
  • ****
    • USA
It's definately not fighter factory, I'll personaly vouch for that. The problem is Urien mirror self because I cannot reproduce the error on other characters, even those poorly made and when I looked at the code it self is more or less a cluster fuck paste over of P.o.t.S old and new stuff *scratches head* because I could of sworn he used 1 as his HitDef triggers in projectiles like that. The key is to keep opponent on the ground and send them flying on the last hit for obvious cosmetics purposes. In this case mirror self falls right away because the HitDefs have Fall = 1 and when nulled and tested on other characters they remain on the ground throughout the 5 hits but do not fly over.

What you could try next is to see what you can do with a Projectile/Projectile and HitDefs because 1/2 the work is done for you already.

:pwn: well the entire coding IS heavily based on pot's ryu shinkuu hadouken. because that was the only code i could think of that could help me in someway.

It seems that "Root, StateNo = 3000" caused the problem, let me test the previously mentioned characters you suggested.

kfm, and king worked like a charm but hulk STILL receives only one hit, maybe it's his super armor that causes this?

I also want to find out how to correctly implement the "aegis reflector"

i already have one bug: King's venom strike kinda "feeds" the reflecting projectile, which makes it last longer than usual.
Last Edit: March 29, 2012, 03:52:02 am by Froz
Re: I need help with projectiles
#12  March 29, 2012, 05:45:40 am
  • ****
    • www.justnopoint.com/Masters/
So hows the testing going? Its fixed on my end expect sparks which I am not really worried about.
Re: I need help with projectiles
#13  March 29, 2012, 06:00:48 am
  • avatar
  • ****
    • USA
Last Edit: March 29, 2012, 06:14:25 am by Froz
Re: I need help with projectiles
#14  March 29, 2012, 06:17:24 am
  • ****
    • www.justnopoint.com/Masters/
Well if I can suggest if you want to continue building Urien is to just use .sff and .air but completely revamp the code from scratch and use what you've learned and apply that with your own sence of direction as it would be best because right now the character, especialy the variables are completely all over the place and thats what causing your two moves and more, including an issues with sparks I've found just now to not function properly. Dont take my suggestion as me being a big man or anything like that but I can assure you on everything I still like in this world that the whole copy and paste route will ruin this project.

Good luck man.

*nods and walks away*
Re: I need help with projectiles
#15  April 02, 2012, 09:30:24 am
  • avatar
  • ******
    • Thailand
My Aoko has a decent reflecting code starting at statedef 2000..

It requires three helpers.

One for doing damage.
One for Overriding hits from projectiles by state controllers.
One for overriding helper projectiles (the one that looks more correct).

You can look there if you want. It only breaks when the projectiles that needs to be reflected has both and types of collision boxes and those collision boxes are NOT exactly the same in size and width; it still might work during those instances during certain instances of good timing. It always works against projectiles without clsn2.