supporter-captain

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: How to make a char attack move foward?  (Read 484 times)

Offline thx1138

  • Batman Project Member
  • *****
  • Posts: 177
  • Referrals: 0
How to make a char attack move foward?
« on: August 19, 2009, 10:40:25 PM »
HI guys, i did an special attack for my char Batgirl, some kind of swing attack, but i', having trouble to make the attack  go towards the enemy, it simply stays on the same place.

Here's the codes

; SWING KICKS:=============================================================
 
;WEAK SWING KICK.

[State 5432, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA         
damage = 45, 0         
animtype = Back              
guardflag = MA         
hitflag = MAF         
priority = 3, Hit      
            
pausetime = 8, 8      
sparkno = 0         
sparkxy = -10, -75      
            
hitsound = S2, 5      
guardsound = 6, 0      
ground.type = High      
ground.slidetime = 2      
ground.hittime  = 8      
ground.velocity = -4      
airguard.velocity = -1.9,-.8   
air.type = High         
air.velocity = -1.4,-3      
            
air.hittime = 12      

[State 5432, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1


What should i add to the code to achieve what i want?
« Last Edit: August 19, 2009, 10:51:15 PM by thx1138 »
If you want to know more about my art, here's the site:

http://fernandocarvalho.deviantart.com/

Offline YD

  • ******
  • Posts: 3085
  • Country: 00
  • Referrals: 0
Re: How to make a char attack move foward?
« Reply #1 on: August 21, 2009, 11:32:09 AM »
Well the easy way is to  to add a "POSADD" and reference a frame in the animation or "animelem" in order to get any movement up or down and left or right, the code looks like this:

[State 0, PosAdd]
type = PosAdd
trigger1 =
x = 0
y = 0
;ignorehitpause =
;persistent =


Of course you would have to edit all variables to your taste but this is what I use. So for each frame of the animation that you want movement you would need to make one of these and place it in the move code and for the "trigger1" you will need to add a "animelem = 1" or whatever the frame number is that you decide. Then the "x" and "y" are the movement up and down which is "y", and left and right which is "x". You should take a look at character like Spiderman Or anyone that uses a swing move to give you and better understanding. Make a back up of the character you want to use for reference and then play around with him in fighter factory and if you loaded FF with a winmugen then you can test on the fly and make editing faster. Hope this helps.

Offline El Chupacabras

  • *
  • Posts: 6
  • Referrals: 0
Re: How to make a char attack move foward?
« Reply #2 on: August 31, 2009, 02:06:43 PM »
You can also try using VelSet/VelAdd.