News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Air attack

Started by mohamedj12, February 13, 2010, 07:29:08 PM

Previous topic - Next topic

mohamedj12

Hello i need some help on this air attack can you guys tell me how i can keep him in the air until the attack is finished then he comes down 
Quote

Nnaajj

Make the attack like a regular attack except...

[StateDef 600]
type = A
movetype= A
physics = A

Make sure there's no velset and change state aswell.
Quote from: Luis Alejandro on July 27, 2010, 07:46:45 PM
Quote from: RaiN on July 27, 2010, 07:44:57 PM
Kinda strange but I woke up today and her hand was on my ass cheek
I won't suspect anything though I'll take it she was sleeping and didn't notice
you should have flipped over slowly

mohamedj12

didnt help he is still coming down well he is doing the air attack what i want is for him to stay in the  air until the attack is finished and come down

GT

Maybe posting the code would help us help you a bit more. :)

Nnaajj

Quote from: mohamedj12 on February 13, 2010, 08:01:14 PM
didnt help he is still coming down well he is doing the air attack what i want is for him to stay in the  air until the attack is finished and come down
Oh right... Should of explained it better.
Basically, make it like a normal move and then add a statetypeset:
[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 1
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N
This will make the moves physics change to air physics which will make him fall down.
Where it says trigger1 = animelem = 1, change that to the frame of the animation where you want him to fall down.
Quote from: Luis Alejandro on July 27, 2010, 07:46:45 PM
Quote from: RaiN on July 27, 2010, 07:44:57 PM
Kinda strange but I woke up today and her hand was on my ass cheek
I won't suspect anything though I'll take it she was sleeping and didn't notice
you should have flipped over slowly

jailuis

I guess its

physics = N

There gravity wont be aplied  and ur char will stay on his state unless a change state is applied or he get hitted...

Maybe a Animtime=0 or something like that in the changestate will be helpful..cant be sure since I dont see the code


mohamedj12

Here is the code and i did what you said but he is still coming down
Quote
; Jump light Punch
; CNS difficulty: easy
[Statedef 600]
type    = A
movetype= A
physics = A
juggle  = 1
poweradd = 20
ctrl = 0
anim = 600
sprpriority = 2


[State 600, 1]
type = HitDef
triggerall=hitcount<1
trigger1 = animelem = 4
trigger2 = animelem = 5
trigger3 = animelem = 6
attr = S, NA
damage = 40, 0
animtype  = Hard
guardflag = HA
hitflag = MAF
priority = 4, Hit
pausetime = 8, 10
sparkno = 11
guard.sparkno = s6160
sparkxy = -10, -40
hitsound = S1, 1
guardsound = S2, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -3, 6
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -3,10
air.hittime = 20
fall=1


[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 9
statetype = A       ;S,A,C,L
movetype = A        ;I,A,H
physics = A         ;A,C,S,N


[State 600, 5]
type = CtrlSet
trigger1 = AnimTime = 0
value = 1

mohamedj12

Quote from: jailuis on February 13, 2010, 08:16:36 PM
I guess its

physics = N

There gravity wont be aplied  and ur char will stay on his state unless a change state is applied or he get hitted...

Maybe a Animtime=0 or something like that in the changestate will be helpful..cant be sure since I dont see the code



well the changing the phicys to n kind of worked if if he jump forward and does the attack he does it will he is jumping forward

Rajaa Retired

Either use a posfreeze sctrl that triggers while your character is still attacking (use animelemtime(??) or something).

Or

Change physics to N, then use a gravity/veladd sctrl that activates after your character finishes attacking. Then you'll need a changestate when you are falling and at or below ground level.

Or

change physics to A by using a statetypeset ctrl after the attack is over. No changestate is needed since it'll just take you to statedef 52 (the common land from jump state).

mohamedj12

Never mind i got it working using a bunch of velsets but thank you guys

Byakko

Quoteusing a bunch of velsets
Don't. Do what Rajaa said.
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.