Jump to content
  • 0

upper cut codeing


YungBlaze

Question

how would i code a upper cut were  sprite leaves the floor then falls after last frame?

 

what im going for: tried to wing it but failed he just goes up forever

upe.gif?token_hash=AAEaIA7ThweIbBlAZbsjG

[Statedef 253, Blade 4]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = s                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 253                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)



[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 3
x = 0
y = -5
;ignorehitpause = 
;persistent = 
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = AnimElem = 12
value = 41
;elem = 1
;ignorehitpause = 
;persistent = 




[State 253, 1]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = AnimElem = 3
trigger3 = AnimElem = 4
trigger4 = AnimElem = 5
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = Light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 10             ;Time opponent is in hit state
ground.velocity = 0,-2.5           ;Velocity at which opponent is pushed
airguard.velocity = -7.6,-3.2    ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -5.6,-12          ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 15                 ;Time before opponent regains control in air

[State 253, 2]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 253, 3]
type = ChangeState
trigger1 = AnimTime = 12
value = 4
ctrl = 1
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

You have the right idea going into it. I'm assuming you mean for it to work like an SRK(Shouryuken)? The velset you have is fine. Basically, having the char rise on the anim frame they're suppose to/you want them to. You have to change the statetype and physics of the move once your char is in the air though. Use a statetypeset script to change the char to air type(type=a) and most times people generally use no physics(physics=n). However, you don't have to use no physics, this is only if you want to fully control all the chars momentum, gravity, etc. once they're airbourne. If you want, you could just set the physics to air type (physics=a) and MUGEN will handle all that automatically based on your char's parameters. It's up to you how you want to go about that. Have the statetypeset script trigger on the same anim your char rises from the ground. So, in this case above, it would be AnimElem = 3. You anim should also loop or have an time of -1 for the last frame. Whichever is more befitting of said anim. This is so you char won't change anim in the air or repeat the entire anim over again.

 

Once you have that out of the way, you need to possibly create a landing state for the attack, or have you char go to their default landing state. MUGEN reads state 52 as the default land from jump state. So, you could do something like this...

 

[state #, Land from uppercut]
type = ChangeState
trigger1 = StateType = A
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52
 
The first trigger1 has MUGEN check if you char is air type. This is so your char won't change to the landing state prematurely. The 2nd trigger1 has MUGEN change your char's state once they reach ground level. You can create you own landing state. In which case, you'll have to change the value number to said state. Along with making sure to put a posset script inside said landing state, with a y value of 0. This is so you char won't sink into the floor. There's several ways you can modify this and so on, but this basis should be good to work with. MUGEN is all about trial and error, so don't feel discouraged if you get some thing wrong at first. Experiment and try different things. Eventually, you'll get the hang of it. I hope this helps.
Link to comment
Share on other sites

  • 0

i gave it a shot and got it to work  im not 100% sure if i did it the right way but it works but iv run into a problem now when i get hit it get stuck in the air (till i jump at least)
 

[Statedef 253, Blade 4]
type    = S                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A                      ;Move-type: A-attack, I-idle, H-gethit
physics = s                      ;Physics: S-stand, C-crouch, A-air
juggle  = 1                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)
anim = 253                       ;Change animation (Def: no change)
poweradd = 10                    ;Power to add (Def: 0)
sprpriority = 2                  ;Set p1's sprite layering priority to 2 (in front)



[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 4
x = 0.5
y = -6.4

[State 0, Gravity]
type = Gravity
trigger1 = time > 27
;ignorehitpause = 
;persistent = 

[State 0, ChangeState]
type = ChangeState
triggerall = time > 27
trigger1 = movetype = a
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 52
ctrl = 0





[State 253, 1]
type = HitDef
trigger1 = AnimElem = 4
trigger2 = AnimElem = 5
trigger3 = AnimElem = 6
trigger4 = AnimElem = 7
trigger5 = AnimElem = 8
attr = a, NA                     ;Attribute: Standing, Normal Attack
damage = 23, 0                   ;Damage that move inflicts, guard damage
animtype = light                 ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 3, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 5, 5                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = -40, -304              ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = trip               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 20             ;Time opponent is in hit state
ground.velocity = -0.5,-6.4              ;Velocity at which opponent is pushed
airguard.velocity = -7.6,-3.2    ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -0.5,-6.4          ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 20                 ;Time before opponent regains control in air

[State 253, 2]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 253, 3]
type = ChangeState
trigger1 = AnimTime = 12
value = 52
ctrl = 1


this is how it came out

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...