Well, I don't know which ones you're looking at so I can't break anything down for you but I'll give you an example of a very simple code that I just came up with using CvS ken Sprites and break it down for you.
Here are the steps (for a forward moving Ashura Senku);
1. Make an animation for the move with whatever animation you want but make it an animation with 7 Frames and 58 ticks in total. Label it however you want but in this case I'll just label this Animation as Number 1900.
So your animation should look like this:
startup=Frames 1-5 (18 ticks total), Movement=Frame 6 (35 ticks), Recovery= Frame 7 (5 ticks).
Now for the code (you can copy and paste this but make sure Statedef 1900 isn't already used:
Code:
;Ashura Senku
[StateDef 1900]
type = S
movetype = I
physics = N ;-->No physics as we will define it ourselves.
anim = 1900
velset = 0,0
ctrl = 0
poweradd = 0 ;-->Add any value for power gain
[State 1900, NotHitBy] ;-->Invulnerability during move
type = NotHitBy
trigger1 = AnimTime < -5 ;-->Invulnerable to all moves until the last 5 frames. If you want to be full Invul then use: trigger1 = 1
value = SCA ;-->Cannot be hit by anything
time = 1
ignorehitpause = 1
[State 1900, PlayerPush] ;-->Enable Passing through p2. (Assuming you have collision boxes)
type = PlayerPush
trigger1 = AnimTime<-5 ;-->Can pass through p2 until last 5 frames.
value = 0 ;--> No player push
ignorehitpause = 1
[State 1900, VelSet] ;-->Movement velocity
type = VelSet
trigger1 = AnimElem=6;-->Move at Frame 6
x = 6 ;-->Change to whatever (positive value)
[State 1900, VelAdd] ;-->Apply friction (deceleration)
type = VelAdd
trigger1 = vel x>0 ;-->Only if moving
trigger1 = AnimElemTime(6)>20 ;-->Apply friction when moving for more than 20 ticks.
x = -0.6 ;--> Change to whatever (negative value)
[State 1900, VelSet] ;--> Stops character from moving backwards due to VelAdd (above).
type = VelSet
trigger1 = vel x<0
x = 0
[State 1900, AfterImage] ;-->Change values to whatever you want. Note: Helpers/Explods would be better for afterimages though this is fine for now.
type = AfterImage
trigger1 = !time
time = 45
length = 6
palcolor = 256
palinvertall = 0
palbright = 50,50,50
palcontrast = 110,110,110
palpostbright =0,0,0
paladd = 8,8,8
palmul = 1,1,1
timegap = 2
framegap = 2
trans = Add1
[State 1900, ChangeState] ;--> Move over
type = ChangeState
trigger1 = AnimTime=0
value = 0
ctrl = 1
Play with the numbers in the state controls and test it until you're familiar with it. When you think you got it, make a proper one with the actual animation that you want.
If you want to make backwards movement and/or various speeds like Akuma has, then you have to create a different state for each movement.
Note that for a move like this it is easier to have different fwd/back movements and varying speeds (depending on the input motion) all in one state but that is a little more advanced.
Again, once you're more familiar, go look into how others code the actual move as I'm sure it's much better than something I put together in 5 min.
Bookmarks