YesNoOk
avatar

Need help with making a move with multiple hits, hit once. (and one other thing) (Read 2722 times)

Started by Koop, November 01, 2007, 01:01:01 pm
Share this topic:
Need help with making a move with multiple hits, hit once. (and one other thing)
#1  November 01, 2007, 01:01:01 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Some moves like Ryu's Tatsumaki senpuu kyaku only hit once, but have many opportunities to hit due to having more than one hit def. How do I make this effect?

Also, since I'm using hi-res hit sparks, how do I fix it so the guard sparks appear for each hitdef?

Thanks for any help given.
Re: Need help with making a move with multiple hits, hit once. (and one other th
#2  November 01, 2007, 01:11:14 pm
  • avatar
  • ******
How exactly do you want your Ryu to behave ?
Hit once then no more even if he goes through the opponent without hitting even though the sprites and clsn clearly overlap ? You can add a !movecontact or !movehit to the triggers of the hitdef(s). Another possibility would be to change the movetype to anything other than A since doing so ignores hitdefs.
If you don't even want the clsn to touch and make the first hit send the opponent too far away, you only need to give the hitdef bigger hitvels without restricting the triggering of the hitdefs.
edit - woops, I misread the original question, but the idea is the same. Rephrasing now.

Guardsparks and hitsparks, use explods triggered by moveguarded. If you already implemented hi-res hitsparks, I guess you had to set variables to define the x and y positions of the hitsparks and used explods to be able to scale them ; just do the same with the guardsparks.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Last Edit: November 01, 2007, 01:18:08 pm by Baiken
Re: Need help with making a move with multiple hits, hit once. (and one other th
#3  November 01, 2007, 01:13:10 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
You don't have to have several hitdefs.

Let's say you have anim 6000, with animelem=3 having an attack CLSN and Ryu's foot turned to the left, and animelem=6 having an attack CLSN and Ryu's foot turned to the right.
Then you'd just have to use one hitdef with these triggers :

trigger1 = Anim = 6000
trigger1 = AnimElem = 3
trigger2 = Anim = 6000
trigger2 = AnimElem = 6

Afterwards, you just have to fix the fall parameter to make the opponent fall once he gets hit one time, and adjust the vels to avoid any problem.
Plus, you may want to add a line like this to your hitdef:

triggerall = !movehit

High-res hitsparks : are they a state -2 code triggered as movehit or movecontact ?

EDIT : once again, Baiken beat me to it. :(
Re: Need help with making a move with multiple hits, hit once. (and one other th
#4  November 01, 2007, 01:29:09 pm
  • avatar
  • ****
Just in case you want a downright simple explanation; any trigger that triggers the hitdef after the first hit should have a '!movehit' trigger. For example:
Quote
type = HitDef
trigger1 = AnimElem = 5
trigger2 = !movehit
trigger2 = AnimElem = 7
trigger3 = !movehit
trigger3 = AnimElem = 9

And so on. This means that those hits (on trigger2 and trigger3) will only trigger if there has been no existing hit by the hitdef beforehand. In the game, if Ryu hits the opponent once (triggered by the hitdef), he won't hit the opponent again. And I'm guessing that's what you want to achieve here.

Then adjust vels/fall/fall.recover/air.fall and so on as you see fit.
Re: Need help with making a move with multiple hits, hit once. (and one other th
#5  November 01, 2007, 02:28:28 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
The move behaves properly now. One hitdef with several triggers.

I guess you had to set variables to define the x and y positions of the hitsparks and used explods to be able to scale them ; just do the same with the guardsparks.

That's Correct but the guard spark only appears on 1 guard. 

High-res hitsparks : are they a state -2 code triggered as movehit or movecontact ?

The latter.
Re: Need help with making a move with multiple hits, hit once. (and one other th
#6  November 01, 2007, 02:56:25 pm
  • avatar
  • ******
Quote
The latter.
He didn't mean "which one, movehit or movecontact", he meant "is there anything in -2 that triggers with any of those two".
Quote
That's Correct but the guard spark only appears on 1 guard.
What do you mean "on 1 guard" ? ??? You mean the first hit is guarded, the spark appears, but if the same move connects several times afterward and is guarded, the spark doesn't come out anymore ? Then, don't forget to reset the hit detection. Can you post your code ?

Quote
any trigger that triggers the hitdef after the first hit should have a '!movehit' trigger.
It can be made as a triggerall too, since there won't be any hit before the first hit anyway :P
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Need help with making a move with multiple hits, hit once. (and one other th
#7  November 01, 2007, 03:42:52 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Quote
The latter.
He didn't mean "which one, movehit or movecontact", he meant "is there anything in -2 that triggers with any of those two".
What I meant by the latter was "movehit and movecontact" and not Statedef -2

Quote
What do you mean "on 1 guard" ? ??? You mean the first hit is guarded, the spark appears, but if the same move connects several times afterward and is guarded, the spark doesn't come out anymore ? Then, don't forget to reset the hit detection. Can you post your code ?

Yes that's what happens. The guard spark appears once on the first guard but not any further guards.

It looks like this right now

[State 1000, hitspark]
type = Explod
trigger1 = moveguarded
anim = 7016
postype=p2
pos= -0,-100
scale = .5,.5
ontop = 1
ownpal = 1
ignorehitpause = 1
Persistent = 0

Re: Need help with making a move with multiple hits, hit once. (and one other th
#8  November 01, 2007, 04:41:28 pm
  • avatar
  • ******
Quote
trigger1 = moveguarded
[...]
Persistent = 0
Well, you're kinda asking it to not appear more than once. If you want multiple hits (guarded), you need multiple explods - and not remove the persistent = 0 or you'll get several guardsparks for the same hit.
Add triggers related to the animelem, you might need to add a movehitreset to avoid having the following guardsparks displayed even when the following hits aren't guarded - but then you won't be able to use the "hit only once" for Tatsumaki if you use movecontact as a trigger. You might need to use a variable set to 1 when a move is guarded, create a guardspark according to that var instead of moveguarded, reset the var, set it back to 1 for the following hitdef guarded etc.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Need help with making a move with multiple hits, hit once. (and one other th
#9  November 01, 2007, 05:27:58 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Added multiple explods. Works ok now. Thank you for all of your help (and for putting up with me).  :)