YesNoOk
avatar

Minor issue with reversal code (Read 2150 times)

Started by #Shaun, December 06, 2007, 11:36:05 pm
Share this topic:
Minor issue with reversal code
#1  December 06, 2007, 11:36:05 pm
  • *****
  • corner push pusher
This is a simple reversal I just coded but...it doesn't feel like one. Most reversals go into effect as soon as the opponent lays a punch/kick on you. When I perform this one the opponent is at least 1 1/2 step away from me, then it goes into effect. The Clsn1 box is no where near that far (this move is for Mr.X, the same scaling as Kung Fu Guy/Thomas).

In other words, I want the reversal to go into effect at the precise moment the opponent lands their ATK.
This is what I got
[mcode][Statedef 4600]
type    = S
movetype= H
physics = S
juggle  = 4
poweradd = 30
ctrl = 0
velset = 0,0
anim = 4600

[State 4601, VelAdd]
type = VelAdd
trigger1 = animelem = 1
x = 4

[State 4600, ReversalDef]
type = ReversalDef
trigger1 = animelem = 1
reversal.attr = SA,NA,SA
pause,12
pausetime = 9
sparkno = S1500
hitsound = S895,5
p1stateno = 4601
p2stateno = 4650


[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;================
[Statedef 4601]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd = 30
ctrl = 0
velset = 0,0
anim = 4601

[State 4601, EnvColor]
type = EnvColor
trigger1 = animelem = 2
value = 255,255,255
time = 4
under = 1

[State 1234, PalFX]
type = PalFX
trigger1 = time = 0
time = 13
add = 17,251,33
mul = 45,219,120
sinadd = 30,55,85,10
invertall = 0

[State 4601, VelAdd]
type = VelAdd
trigger1 = animelem = 2
x = 8

[State 630, 2]
type = HitDef
trigger1 = Animelem = 2
attr = A, NA
damage = 13,7
guardflag = HA
priority = 3
pausetime = 7,7
sparkno = 1
sparkxy = -5,-35
hitsound   = 5,0
guardsound = 6,0
ground.type = High
ground.slidetime = 6
ground.hittime  = 6
ground.velocity = -3,-7
air.velocity = -3,-5
fall = 1

[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;==============
[Statedef 4650]
type = S
physics = N
movetype = I
anim = 5000
velset = 0,0
sprpriority = 2
ctrl = 0

[State 4650, AS]
type = assertspecial
trigger1 = time >=0
flag = nowalk

[State 4650, 3]
type = selfstate
trigger1 = time = 20
value = 0
ctrl = 1[/mcode]

I
Last Edit: December 06, 2007, 11:53:13 pm by #Shaun
Re: Minor issue with reversal code
#2  December 07, 2007, 01:19:52 am
  • ******
  • YOMI
    • www.justnopoint.com/lbends
There is no reason to use a reversaldef instead of a hitoverride, you'll save yourself a whole mess of trouble by recoding it.
Re: Minor issue with reversal code
#3  December 07, 2007, 01:57:00 am
  • *****
  • corner push pusher
Re: Minor issue with reversal code
#4  December 07, 2007, 02:12:48 pm
  • ******
  • YOMI
    • www.justnopoint.com/lbends
Because hitoverride isn't filled with bugs and acts the way you expect it to.
Re: Minor issue with reversal code
#5  December 07, 2007, 02:42:21 pm
  • ******
    • www.mugenguild.com/pots/
Use anything you want from my works.  If you need to contact me use email, not private messages.
Re: Minor issue with reversal code
#6  December 07, 2007, 04:49:43 pm
  • *****
  • corner push pusher
Last Edit: December 07, 2007, 04:54:51 pm by #Shaun
Re: Minor issue with reversal code
#7  December 07, 2007, 04:57:56 pm
  • ******
  • YOMI
    • www.justnopoint.com/lbends
Definitely, but removing the pause and pausetime values may also yield the desired result.

IIRC when you use pausetime the format is  pausetime = A [, B] where A is the time you are paused and B is the time your opponent is paused, you left the latter one out.
Re: Minor issue with reversal code
#8  December 07, 2007, 06:07:54 pm
  • *****
  • corner push pusher
Definitely, but removing the pause and pausetime values may also yield the desired result.

IIRC when you use pausetime the format is  pausetime = A [, B] where A is the time you are paused and B is the time your opponent is paused, you left the latter one out.

Ah haaa......it's always the little things that get me. Thanks for the help  8)

POST EDIT:

[mcode][State 4600, 4]
type = HitOverride
trigger1 = animelem = 1
time = 10
attr = SA,NA,HA
slot = 0
pausetime = 9,9
sparkno = S1500
hitsound = S895,5
stateno = 4601
p2stateno = 4650[/mcode]

It works! Again, thanks for the help
Last Edit: December 07, 2007, 06:24:13 pm by #Shaun
Re: Minor issue with reversal code
#9  December 07, 2007, 06:41:11 pm
  • ******
    • www.mugenguild.com/pots/
Half of what you wrote in that Sctrl has no effect :-X, only applies to ReversalDefs (pausetime, p2stateno...).
Use anything you want from my works.  If you need to contact me use email, not private messages.