YesNoOk
avatar

Need help diagnosing and fixing this attack. (Read 3354 times)

Started by DNZRX768, January 01, 2021, 05:59:05 pm
Share this topic:
Need help diagnosing and fixing this attack.
#1  January 01, 2021, 05:59:05 pm
  • *****
  • Hug Pikachus!
    • USA
I'm starting to get back into MUGEN development and one of the things I'm doing is fixing up problems I have encountered with other characters.

The subject of this topic is Clowna by MrPr1993. Occasionally, whenever she attacks with a specific move and actually defeats someone with it, she just floats up and disappear, something that is not supposed to happen.

Here is a clip from a failed survival run recording showcasing the error happening:
https://streamable.com/ed0fk6
I can confirm this happening at least twice in the past and with her facing Kung Fu Man. And with her using that move of similar moves.

Here is the coding of the move in question:
Code:
;---------------------------------------------------------------------------
; Bouncy Clown
;Source: Splode's Rikuo
[Statedef 1000]
type = C
physics = S
ctrl = 0
anim = 40
velset = 0,0

[State 1000, Set]
type = PosSet
trigger1 = time = 0
y = 0

[State 1000, 1]
type = ChangeState
trigger1 = time = 7
value = 1005

;---------------------------------------------------------------------------

; Actual Hop Back
[Statedef 1005]
type = A
physics = A
ctrl = 0
anim = 105

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 2
value = S0,2

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 2
value = S200,1

[State 1005, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 1005, 2]
type = ChangeState
triggerall = time > 2
trigger1 = Pos Y >= -4
value = 1006

;---------------------------------------------------------------------------
; Bouncy Clown - Light
; Performed from the hopback jumping state
[Statedef 1006]
type = A
movetype = A
physics = A
anim = 1000
velset = 0,0
ctrl = 0
poweradd = 60

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = Time=0
trigger1 = prevstateno = 1030
value = 1000
elem = 2


[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = S0,3

[State 0, PlaySnd]
type = PlaySnd
trigger1 = Time = 1
value = S200,4


[State 830, 3]
type = VelSet
triggerall = time < 4
trigger1 = AnimElem = 2
x = 8.5
y = -5.5

[State 830, 4]
type = PlaySnd
triggerall = time < 4
trigger1 = AnimElem = 2
value = 4, 3

[State 830, 5]
type = hitdef
trigger1 = time = 3
attr = A, SA
hitflag = MAF
guardflag = MA
animtype = back
priority = 5
damage = 90, 3
pausetime = 2, 9
sparkno = 2
sparkxy = 10, -20
hitsound = S2,2
guardsound = S2, 6
ground.type = high
fall = 1
air.fall = 1
guard.slidetime = 10
ground.velocity = -6, -4
air.velocity = -8, -3

[State 830, 6]
type = Velset
triggerall = var(1) = 0
trigger1 = movecontact
x = -4
y = -3

[State 830, 7]
type = ChangeAnim
trigger1 = movecontact
trigger1 = anim != 1002
value = 1002

[State 0, ChangeState]
type = ChangeState
trigger1 = anim = 1002
trigger1 = animtime = 0
value = 5040
ctrl = 0

[State 830, 8]
type = VarSet
trigger1 = movecontact
v = 1
value = 1

It seems okay and I can't figure out what is the problem, or how to fix it without breaking the move. Can you help me out by figuring out what is wrong and how to fix it?
Hug the Pikachus!

Hug A Pikachu Today!
Re: Need help diagnosing and fixing this attack.
#2  January 02, 2021, 05:18:54 am
  • avatar
  • **
    • USA
Pretty sure that the problem is that it's going to statedef 5040.  5040 is a get hit state and has various code for handling being hit.  Of course, you're not being hit if you're the one doing the attacking, so you're going to get ctrl and idle as soon as the round ends, but you're still in the air.  Mugen sees that as good enough to try to go to win pose.  No bueno.

It should be using a custom state for that action, but maybe you can use statedef 5050 instead?  The real solution is to code a proper recovery statedef for the attack and go to that.
Re: Need help diagnosing and fixing this attack.
#3  January 02, 2021, 03:56:43 pm
  • *****
  • Hug Pikachus!
    • USA
I'll try your suggestion of using state 5050.

In the meantime, here are the coding for state 5040 and related states from her code files. It is slightly different than normal, so there might be a clue here...

Code:
;---------------------------------------------------------------------------
; Air get-hit (recovering in air, not falling)
[Statedef 5040]
type    = A
movetype= H
physics = N

[State 5040, 1]
type = ChangeState
trigger1 = !Alive
value = 5050
ctrl = 0

[State 5040, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 5040, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 5040, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 5040, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5040, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;Jump land

;---------------------------------------------------------------------------
; Air get-hit (falling)
[Statedef 5050]
type    = A
movetype= H
physics = N

[State 5050, 1] ;Change anim when done with transition
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim = 5035
trigger2 = Time = 0     ;If no transition anim
trigger2 = Anim != 5035
trigger2 = (Anim != [5051, 5059]) && (Anim != [5061, 5069])
trigger2 = Anim != 5090 ;Not if hit off ground anim
value = 5050

[State 5050, 2] ;Coming down anim
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, Const720p(4), Const720p(-8))
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0

[State 5050, 3] ;Gravity
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 5050, 4] ;Recover near ground
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= Const(movement.air.gethit.groundrecover.ground.threshold)
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;Air get-hit (fall recovery on ground)

[State 5050, 5]; Recover in mid air
type = ChangeState
triggerall = Vel Y > Const(movement.air.gethit.airrecover.threshold)
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;Air get-hit (fall recovery in air)

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, Const(movement.air.gethit.groundlevel))
value = 5100 ;Downed get-hit (hit ground from fall)
Hug the Pikachus!

Hug A Pikachu Today!
Re: Need help diagnosing and fixing this attack.
#4  January 02, 2021, 07:28:38 pm
  • *****
  • Hug Pikachus!
    • USA
A bit of update:

The 5050 method did not work since it shows her flat on her back as if being thrown back, which is not the move's intent.

However, I made another state which is similar to 5040, with a few key differences. The attack, upon contact, will go to this state.

Here is the code. I'm running some tests right now, but is there any foreseeable problems that might arise, especially the original problem that started it all?

Code:
;---------------------------------------------------------------------------
; Finishing Off Bounce
[Statedef 1017]
type    = A
movetype= I
physics = N

[State 1017, 1]
type = ChangeState
trigger1 = !Alive
value = 5050
ctrl = 0

[State 1017, 2]
type = ChangeAnim
trigger1 = AnimTime = 0
trigger1 = Anim != 5040
trigger2 = Time = 0
trigger2 = Anim != 5035
value = 5040

[State 1017, 3]
type = CtrlSet
trigger1 = HitOver
value = 1

[State 1017, 4]
type = StateTypeSet
trigger1 = HitOver
movetype = I

[State 1017, 5]
type = VelAdd
trigger1 = 1
y = GetHitVar(yaccel)

[State 1017, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;Jump land
Hug the Pikachus!

Hug A Pikachu Today!
Re: Need help diagnosing and fixing this attack.
#5  January 03, 2021, 03:02:33 am
  • avatar
  • **
    • USA
Ok, I decided to stop being lazy and actually test it.

You can just sum it up as this and it gets the original result with (hopefully) no possibility of going haywire.

Code:
; Finishing Off Bounce
[Statedef 1017]
type    = A
movetype= I
physics = A
Anim = 5040
 
[State 1017, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 52 ;Jump land

Explanation of what's going on and what I changed:
"type = A" tells mugen that you are in the air.  I don't know what statetypeset to I does, but we don't want that to happen.  We need to be A until we hit the dirt.

"physics = A" tells mugen to use gravity.  We don't want to use triggers or anything to effect the gravity because we received a velocity from the previous state and just need to fall down now.  At no point do we want mugen to decide that velocity or gravity should be 0 before we hit the ground.

Just setting anim to 5040 from the get-go because if we die or get hit during this move, we're going to change state anyways.

Removed all that unnecessary crap because it doesn't need to be there for the aforementioned reasons.  We didn't get hit, so we don't want sctrls that check if we did.  That might do something weird and weird is bad.  I actually tested a version that used gravity sctrl and kept the veladd sctrl.  The result was different from original!  ???
Re: Need help diagnosing and fixing this attack.
#6  February 04, 2021, 05:41:19 am
  • *****
  • Hug Pikachus!
    • USA
Okay, so an update on my work with regards to this attack.

The good news is that I am certain the attack is fixed with regards to the actual move itself.

The bad news is that the problem is still there.

Further good news is that I've isolated the problem finally.

Though the further bad news is that I am a bit stuck on how to resolve it.





Based on what I can understand, the glitch only happens when the character is in AI mode and almost all of the time is in state 4100. In almost of all of the instances where the glitch happened, the Bouncy Ball move was used. However, the one involving New Pikachu was an odd case. Clowna used a hyper where she summons a large balloon that acts like a floating land mine. Pikachu used a ramming dash attack, hit Clowna, sent her flying a bit upward, hit the balloon, was defeated, and Clowna flies off like all other times, so the problem is with the coding of the AI in state 4100, among other things.

Code:
;---------------------------------------------------------------------------
[State -1, AI go to StandAI];if all these triggers are right then go to state 4000 and do an attack or something
type = ChangeState
value = 4050
triggerall = var(59) = 1
triggerall = var(30) != 1
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist x < 70
triggerall = p2statetype != A
triggerall = Ctrl = 1
trigger1 = Random < 500
Trigger2 = Time > (30-AILevel*2)

;---------------------------------------------------------------------------
[State -1, AI go to SpecialAI];same as above except if far away
type = ChangeState
value = 4000
triggerall = var(59) = 1
triggerall = var(30) != 1
triggerall = statetype != A
triggerall = p2statetype != L
triggerall = p2bodydist x > 70
triggerall = p2statetype != A
triggerall = Ctrl
trigger1 = Random < 500
Trigger2 = Time > (90-AILevel*2)

;---------------------------------------------------------------------------
[State -1, AI go to AirAI];same as above but in air
type = ChangeState
value = 4100
triggerall = var(59) = 1
triggerall = var(30) != 1
triggerall = statetype = A
triggerall = p2statetype != L
triggerall = Ctrl
trigger1 = Random < 500
Trigger2 = Time > (30-AILevel*2)

This is the coding in the CMD file that the AI uses...

Code:
;---------------------------------------------------------------------------
;AI Standing
[StateDef 4000]
Ctrl = 0
Anim = 0

[State 2000];this decides the attack
Type = VarRandom
triggerall = RoundState = 2
Trigger1 = Time = 0
V = 25
Range = 1,17
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
triggerall = p2bodydist x < 60
trigger1 = Statetype=S
Trigger1 = Var(25) = 1
Value = 200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
triggerall = p2bodydist x > 60
trigger1 = Statetype=S
Trigger1 = Var(25) = 1
Value = 202
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
triggerAll = Statetype=S
triggerAll = enemy, statetype = L
Trigger1 = Var(25) > 1 && Var(25) < 17
Value = 700
IgnoreHitPause = 1


[State 500]
Type = ChangeState
TriggerAll = Time > 5
trigger1 = movehit
trigger1 = Statetype=S
Trigger1 = Var(25) = 1
trigger1 = stateno=200

trigger2 = movehit
trigger2 = Statetype=S
Trigger2 = Var(25) = 1
trigger2 = stateno=200
Value = 201
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 2
Value = 210
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 3
Value = 230
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 4
Value = 240
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 5
Value = 400
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 6
Value = 410
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 7
Value = 430
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 8
Value = 440
IgnoreHitPause = 1

[State 500]
Type = ChangeState
Trigger1 = Var(25) = 9
trigger1 = Statetype=S
trigger1 = hitdefattr
Value = 760
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = p2bodydist x < 1
Trigger1 = Var(25) = 9
trigger1 = Statetype=S
Value = 800
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = p2bodydist x < 1
Trigger1 = Var(25) = 9
trigger1 = Statetype=S
Value = 800
IgnoreHitPause = 1

[State 500] ; if you want you can remove the next 3 since they are for fire breath and it wont be a good idea to do it up close
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 10
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 11;var(25) = 11 is repeated twice since if power not more than 330 it wont just get stuck
Value = 1010
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 11
trigger1 = Statetype=S
Value = 1020
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 12
trigger1 = Statetype=S
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0;next 2 are the hammers (close and EX version) since they kind of work up close
Trigger1 = Var(25) = 13
trigger1 = Statetype=S
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = p2bodydist x <1
Trigger1 =  Var(25) = 13
trigger1 = Statetype=S
Value = 1200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 14
trigger1 = Statetype=S
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 15
trigger1 = Statetype=S
Value = 1400
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 15
trigger1 = Statetype=S
Value = 1420
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 1000
Trigger1 = Var(25) = 16
trigger1 = Statetype=S
Value = 3000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
Trigger1 = Var(25) = 16
trigger1 = Statetype=S
trigger1 = hitdefattr
trigger1 = command="holdfwd"
Value = 761
IgnoreHitPause = 1

[State 500]
Type = ChangeState
Trigger1 = Var(25) = 16
trigger1 = Statetype=S
trigger1 = hitdefattr
trigger1 = command="holdback"
Value = 762
IgnoreHitPause = 1

[State 500]
Type = ChangeState
Trigger1 = Var(25) = 16
trigger1 = Statetype=S
trigger1 = hitdefattr
trigger1 = command="holddown"
Value = 763
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 16
trigger1 = Statetype=S
Value = 40
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 1000
Trigger1 = Var(25) = 17
trigger1 = Statetype=S
Value = 3000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 17
trigger1 = Statetype=S
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0;next 2 are the hammers (close and EX version) since they kind of work up close
Trigger1 = p2bodydist x >8
Value = 100
IgnoreHitPause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = var(25)
text = "The value of ai stand var(25) is %d"
params = var(25)
ignorehitpause = 1
;persistent =

;---------------------------------------------------------------------------
;AI When Closer
[StateDef 4050]
Ctrl = 0
Anim = 0

[State 2000]
Type = VarRandom
triggerall = RoundState = 2
Trigger1 = Time = 0
trigger2 = Stateno=750 ;;Snap out of charging
V = 25
Range = 1,8
IgnoreHitPause = 1

[State 0, VarSet]
type = VarSet
trigger1 = stateno=1050
v = 25    ;fv = 10
value = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 1
trigger1 = Statetype=S
Value = 200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
trigger1 = Statetype=S
Trigger1 = Var(25) = 2;var(25) = 11 is repeated twice since if power not more than 330 it wont just get stuck
Value = 1200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 2
trigger1 = Statetype=S
Value = 200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 3
trigger1 = Statetype=S
Value = 1050
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 4
trigger1 = Statetype=S
Value = 1000
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 4
trigger1 = Statetype=S
trigger1 = numprojid(1405)=0
Value = 1400
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 5
trigger1 = Statetype=S
trigger1 = numprojid(1405)=0
Value = 1410
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 5
trigger1 = Statetype=S
trigger1 = numprojid(1405)=0
Value = 1420
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 5
trigger1 = Statetype=S
trigger1 = numprojid(1405)!=0
Value = 200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 6
trigger1 = Statetype=S
Value = 40
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 1000
Trigger1 = Var(25) = 6
trigger1 = Statetype=S
Value = 3050
IgnoreHitPause = 1


[State 500]
Type = ChangeState
TriggerAll = power >= 1000
Trigger1 = Var(25) = 7
trigger1 = Statetype=S
Value = 3100
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 7
trigger1 = Statetype=S
Value = 200
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 2000
Trigger1 = Var(25) = 8
trigger1 = Statetype=S
Value = 3150
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = time > 0
Trigger1 = Var(25) = 8
trigger1 = Statetype=S
Value = 105
IgnoreHitPause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = var(25)
text = "The value of ai special var(25) is %d"
params = var(25)
ignorehitpause = 1
;persistent =

;---------------------------------------------------------------------------
;AI Air
[StateDef 4100]
Ctrl = 0
Anim = 0
[State 2000]
Type = VarRandom
triggerall = RoundState = 2
Trigger1 = Time = 0
trigger2 = Stateno=750 ;;Snap out of charging
V = 25
Range = 1,4
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 1
Value = 600
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 1
trigger1 = p2bodydist x > 60
Value = 601
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 2
Value = 610
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 3
Value = 630
IgnoreHitPause = 1
[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 3
Value = 630
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 4
Value = 640
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 5
Value = 1030
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = Time > 0
Trigger1 = Var(25) = 6
Value = 1060
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 6
Value = 1210
IgnoreHitPause = 1

[State 500]
Type = ChangeState
TriggerAll = power >= 330
Trigger1 = Var(25) = 6
Value = 1430
IgnoreHitPause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = var(25)
text = "The value of ai Air var(25) is %d"
params = var(25)
ignorehitpause = 1
;persistent =

And this is the AI CNS file. Can anyone identify the problem and help me with a solution?
Hug the Pikachus!

Hug A Pikachu Today!
Re: Need help diagnosing and fixing this attack.
#7  February 04, 2021, 10:41:55 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Chuck an "out" into 4100

Type = changestate
Trigger1 = roundstate != 2
Value = 50

Its getting stuck because the variable in use isn't putting it into another move. Am guessing a bit that var 25 is set to 0 again elsewhere.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Need help diagnosing and fixing this attack.
#8  February 04, 2021, 02:43:13 pm
  • *****
  • Hug Pikachus!
    • USA
Chuck an "out" into 4100

Type = changestate
Trigger1 = roundstate != 2
Value = 50

Its getting stuck because the variable in use isn't putting it into another move. Am guessing a bit that var 25 is set to 0 again elsewhere.

I don't recall seeing it go to zero at any point in time.

Anyway, I'll try your solution after work tonight. Will report back then.
Hug the Pikachus!

Hug A Pikachu Today!