YesNoOk
avatar

Screw kick stuck in air (Read 9113 times)

Started by Zelen, June 09, 2018, 06:55:22 pm
Share this topic:
Screw kick stuck in air
#1  June 09, 2018, 06:55:22 pm
  • avatar
  • *
    • China
    • jack567720@yahoo.com.tw


My character stuck in air if Screw Kick (sketch) didn't finish its 8 hits :computer:

I copied another Rouge's Screw Kick state, this is the original VelSet

[State 100, 1]
type = VelSet
trigger1 = var(1) > 3
x = 16
y = 16


I copied "trigger1 = var(1) > 3" but it's no use :(

There's my part of my Screw Kick's state:
---------------------------------------------------------------------------------------------------------
[state 2402,1]
type = varset
trigger1 = time = 0
var(0) = 0

[state 2402,1]
type = varadd
trigger1 = movecontact =1
var(0) = 1

[state 2402,1]
type = varset
trigger1 = time = 0
trigger2 = movecontact
var(1) = 0

[state 2402,1]
type = varadd
trigger1 = !movecontact
var(1) = 1

[State 230 , 2]
type = HitDef
trigger1 = var(0) < 8
trigger1 = !movecontact
attr = A,HA
damage = 80/(hitcount+1),6
animtype = medium
guardflag = HA
hitflag = MAFD
priority = 4, Hit
pausetime = 0,5
sparkno = s7002
sparkxy = -10,-28
hitsound = s200,5
guardsound = 6,0
ground.type = high
ground.slidetime = 20
ground.hittime = 20
ground.velocity = 5
air.velocity = 8,-5
guard.velocity = -2
airguard.velocity = -2,-0.8
air.fall = 1
fall.recover = 0
id = 3100
getpower = 0,0

[State 100, 1]
type = VelSet
trigger1 = movehit = [1,2]
x = 0
y = 0

[state 2402,0]
type = movehitreset
trigger1 = movecontact > 2

[State 100, 1]
type = VelSet
trigger1 = var(0) = 8
x = 12
y = 12


[state 2500,1]
type = changestate
trigger1 = pos y >= 0
value = 48
---------------------------------------------------------------------------------------------------------
Last Edit: June 11, 2018, 04:03:34 am by Zelen
Re: Screw kick stuck in air
#2  June 09, 2018, 08:39:49 pm
  • avatar
  • **
    • USA
Dunno why you're using winmugen, but whatever.

This is a pretty sloppy way to do this move and it doesn't have enough triggers.  Currently, you are telling the game to add 1 to var(0) on movecontact (a hit) and when it reaches 8, you go forward and down at 12 and change state to 48 when you reach the floor.

It looks bizarre to have an attack where you just sit there in the air for so long.  I'm not sure what makes it stop at any point, but that's where the issue is.  You should make a state specifically for coming out of this attack (the zip down and land) and then use changestate to go to that state when you get your 8 hits or reach some time duration.
Re: Screw kick stuck in air
#3  June 09, 2018, 10:30:39 pm
  • *****
  • Shame on you!
    • USA
The biggest problem I see is,
Code:
[State 100, 1]
type = VelSet
trigger1 = movehit = [1,2]
x = 0
y = 0
I'm not sure why you want to stop your move in mid-air. Especially if that's your biggest problem. You wont always get 8 hits with your move. You're even less likely to get all 8 hits if it doesn't continue to move. It will just push P2 away.
I dont recommend using the vars to control the movement either. Use AnimElemTime() or something similar. Time = could work also.
Unless you're using those variables outside of the current state, I dont see a real reason for them.

Also, what's the reason for
Code:
[state 2402,0]
type = movehitreset
trigger1 = movecontact > 2
vVv Ryuko718 Updated 10/31/22 vVv
Re: Screw kick stuck in air
#4  June 10, 2018, 05:01:49 am
  • avatar
  • *
    • China
    • jack567720@yahoo.com.tw
Thanks for reply. I decide to use normal states(no vars) instead of previous states.

This is the original Screw Kick that I copied its states, Rouge isn't stuck in air even P2 is moving.



Just dunno why "trigger1 = var(1) > 3"  in previous states doesn't work :o
Re: Screw kick stuck in air
#5  June 10, 2018, 10:53:52 am
  • *****
  • Shame on you!
    • USA
[state 2402,1]
type = varset
trigger1 = time = 0
trigger2 = movecontact  ;when P1 hits P2
var(1) = 0                         ;var(1) is set to = 0

So var(1) > 3 wont work when it's 1. 1 < 3.
What's happening is the move expects to hit P2. It will drill and drill. When it doesn't hit P2, it adds to var 1. As soon as 3 tics go by where it's not hitting P2 the velocity is set to 16x 16y.

You need to set up displaytoclipboard to show your var(0) and var(1) values. Use Debug, CTRL+D, to be able to read them on screen.

One tip you should use is when dealing with a move that reacts to P2 being attacked you want to use
ignorehitpause = 1
because Mugen acts funky when hitpauses are involved. Try adding that to all of the varset and varadd in the state. But make sure you use displaytoclipboard to see if the variables are being set/added properly. Look in Mugen Class' Master Thread for it if you dont know how to use it.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Screw kick stuck in air
#6  June 10, 2018, 06:15:14 pm
  • avatar
  • *
    • China
    • jack567720@yahoo.com.tw


So I displayed my var(0) and var(1) on IKEMEN, and changed my trigger:

[State 100, 1]
type = VelSet
trigger1 = var(1) = 0
x = 0
y = 0

[State 100, 1]
type = VelSet
trigger1 = var(1) = 1
x = 14
y = 14

My Rouge is var(1) = 0 about 3 tics when she hits P2 like ABAB's Rouge, but it seems no time to stuck on P2 and fall to the ground soon :???:
ABAB's Rouge increases var(1) value after hits P2 and pass through.

Still can't figure out why I copied same states but it's no use on my character :yuno:
Re: Screw kick stuck in air
#7  June 10, 2018, 10:17:11 pm
  • *****
  • Shame on you!
    • USA
One tip you should use is when dealing with a move that reacts to P2 being attacked you want to use
ignorehitpause = 1
because Mugen acts funky when hitpauses are involved. Try adding that to all of the varset and varadd in the state.

vVv Ryuko718 Updated 10/31/22 vVv
Re: Screw kick stuck in air
#8  June 11, 2018, 04:02:54 am
  • avatar
  • *
    • China
    • jack567720@yahoo.com.tw
Hey,uh...I think I solved my problem :o
My var(1) conflicted to cmd file's var(1)...combo condition check states

It works well when I changed cmd file's var(1) into var(2), thanks anyway! :embarrassed2: