A Few Problems with Character's Script

Started by Fighting Toys Freak, October 18, 2016, 07:11:56 PM

Previous topic - Next topic

Fighting Toys Freak

Hey.

This thread is intended to address some issues I have with coding my character. I apologize for being quite of a lazy M.U.G.E.N programmer. I have been using some preconceived shortcuts for coding my character; however, my level of coding seems to depict intermediate quality. If there is more information that you would like for me to provide--if you have any suggestions in mind, feel free to do so.

Aside from the fact that my character's script suffers from some coding, nonsensical deficiencies, I have posted revelant portions of several, or a couple, state definitions that have considerable, faulty execution. Some of which are unintended, non-executable state definitions for introduction and win moves, which I will not post because I believe that I can rectify some mistakes through simple debugging. You may view some of them in the following spoilers.

For this problem, I have not been able to execute the move for this set of commands. I suppose that the state definition is logically correct and contenting. Nevertheless, I have posted it in case there is an error that causes its failed execution. The move is supposed to be available in two ways:

Spoiler (click to show)

[State -1, Subsitution Jutsu]
type = HitOverride
triggerall = statetype = A || statetype = S
triggerall = power >= (powermax/3) | (var(6) && random <= fvar(18)*1.2)
trigger1 = command = "y" || (command = "x" && power >= floor((powermax/2.5)))
trigger1 = command != "holddown" && command != "holdfwd" && command = "holdback"
trigger1 = ctrl
attr = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
stateno = 430
time = 55
ignorehitpause = 1
;---------------------------------------------------------------------------
[State -1, Subsitution Jutsu Alt]
type = ChangeState
value = 430
triggerall = movetype = H
triggerall = power >= (powermax/3) | (var(6) && random <= fvar(18)*1.1)
trigger1 = command = "y" || (command = "x" && power >= floor((powermax/2.5)))
trigger1 = command != "holddown" && command != "holdfwd" && command = "holdback"
trigger1 = ctrl

Spoiler (click to show)

;Substitution Jutsu
[Statedef 430]
....

[State 0, Helper]
type = Helper
trigger1 = Animelemtime(2) = 1 && time = 12
helpertype = normal ;player
ID = 6004
stateno = 1006
pos = 0,0
postype = p1    ;p2,front,back,left,right
ownpal = 1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = [13,76)
value = 190
elem = 2

[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = time = [13,76)
flag = invisible
flag2 = noshadow

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 77
x = (p2bodydist x)+75
y = 0

[State 0, Turn]
type = Turn
trigger1 = time = 77

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = time = 77
value = 190
elem = 3

....




Another problem is the target-state-inducing moves. The target is throw into air after the move ends indefinitely. Perhaps, this code in the following is root of the problem:

Spoiler (click to show)

...
[Statedef 810]
...
[State 0, HitDef]
type = HitDef
trigger1 = Anim = 200 && Animelem = 2
attr = S,NT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF-        ;HLAFD+-
animtype = light          ;light,medium,hard,back,up,diagup
air.animtype = light
priority = 1,Dodge
damage = 17
sparkxy = 25,-39
hitsound = S5,0
ground.type = Normal     ;Low,Trip,None
ground.cornerpush.veloff = 2
air.cornerpush.veloff = 2
;maxdist = 10,0
snap = -3,-22
p2stateno = 820
id = 820

[State 0, HitDef]
type = HitDef
trigger1 = Anim = 220 && Animelem = 2
attr = S,NT       ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF-        ;HLAFD+-
animtype = heavy          ;light,medium,hard,back,up,diagup
air.animtype = heavy
priority = 1,Dodge
damage = 17
sparkxy = 37,-28
hitsound = S5,2
ground.type = high     ;Low,Trip,None
ground.cornerpush.veloff = 2
air.cornerpush.veloff = 2
ground.slidetime = 11
air.velocity = -.3,6.8
ground.velocity = -.1,6.4
;maxdist = 10,0
snap = 9,-11
p2stateno = 821
id = 820

[State 810, ChangeAnim2]
type = ChangeAnim
trigger1 = Anim != 800
trigger1 = Animtime = 0
value = 800
persistent = 3

....
;-----------------------
...
[Statedef 821]

...

[State 821, 1] ;Gravity
type = VelAdd
Trigger1 = 1
y = .4

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Pos Y < 0
value = 5050 ;Hit Fall




When the character changes to another move from the move above, his velocity abnormally is set in a way that both the target and himself disappears (there could be a different error if I am mistaken):

Spoiler (click to show)

...
[Statedef 823]
...

[State 0, TargetBind]
type = TargetBind
trigger1 = 1
time = 1
pos = 0,0

[State 0, AfterImage]
type = AfterImage
trigger1 = 1
time = 1
palcolor = 256
palinvertall = 0
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 0,0,0
paladd = 10,10,25
palmul = .65,.65,.75
timegap = 3
trans = "add1"

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = -8

[State 0, VelSet]
type = VelSet
trigger1 = ScreenPos Y >= 0 && ScreenPos Y < GameHeight
y = ifelse(!(pos y >= 0),8,0)

[State 0, Pause]
type = Pause
trigger1 = time > 1 && vel y = 0 && pos y >= 0
time = 11
movetime = 1
pausebg = 1
persistent = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = time > 1 && vel y = 0 && pos y >= 0
time = 10
freq = 70
ampl = -8
phase = 80
ignorehitpause = 1
persistent = 1

;[State 0, TargetVelSet]
;type = TargetVelAdd
;trigger1 = vel x != 0
;x = target,const(velocity.airjump.back.x)
;y = -(target,const(movement.yaccel))
;persistent = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time > 1 && pos y >= 0
value = 76
persistent = 0

;[State 0, TargetState]
;type = TargetState
;trigger1 = target,vel x != 0
;value = 821
;persistent = 0

...

Spoiler (click to show)

...
[Statedef 822]
...

[State 0, TargetBind]
type = TargetBind
trigger1 = 1
time = 1
pos = 0,0

[State 0, AfterImage]
type = AfterImage
trigger1 = 1
time = 1
palcolor = 256
palinvertall = 0
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 0,0,0
paladd = 10,10,25
palmul = .65,.65,.75
timegap = 3
trans = "add1"

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
y = -8

[State 0, VelSet]
type = VelSet
trigger1 = ScreenPos Y >= 0 && ScreenPos Y < GameHeight
y = ifelse(!(pos y >= 0),8,0)

[State 0, Pause]
type = Pause
trigger1 = time > 1 && vel y = 0 && pos y >= 0
time = 11
movetime = 1
pausebg = 1
persistent = 1

[State 0, EnvShake]
type = EnvShake
trigger1 = time > 1 && vel y = 0 && pos y >= 0
time = 10
freq = 70
ampl = -8
phase = 80
ignorehitpause = 1
persistent = 1

;[State 0, TargetVelSet]
;type = TargetVelAdd
;trigger1 = vel x != 0
;x = target,const(velocity.airjump.back.x)
;y = -(target,const(movement.yaccel))
;persistent = 1

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = time > 1 && pos y >= 0
value = 76
persistent = 0

;[State 0, TargetState]
;type = TargetState
;trigger1 = target,vel x != 0
;value = 821
;persistent = 0

...



The independent, target-state-inducing move in the following has completely improper implementation. One of its errors is that the target moves away from the player:

Spoiler (click to show)

...
[Statedef 2001]
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = target, power != 0
value = 210
elem = 3

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = 35, -7

[State 2010, Throw]
type = TargetState
trigger1 = AnimElem = 1
value = 820

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = timemod = 30, 0
value = -20
kill = 0
ignorehitpause = 1

[State 0, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = timemod = 30, 0
value = -20
ignorehitpause = 1

[State 0, LifeAdd]
type = LifeAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = target(2001), power = 0
value = 550
ignorehitpause = 1
persistent = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
add = -104,-104,7
mul = 256,256,256
sinadd = 56,56,0,10

...

Spoiler (click to show)

;Opponent Thrown
[Statedef 820]
...
sprpriority = ifelse((enemynear(0),anim = 240 && enemynear(0), stateno = 822),-1,1)

[State 820, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 5000

[State 0, PalFXWiz]
type = PalFX
trigger1 = enemy, stateno = 2001
time = -1
add = 100,100,180
mul = 256,256,256
sinadd = -80,-80,-80,10
ignorehitpause = 1
persistent = 0

Another problem is the projectile helpers; they do not appear after they are called. One exception is the kunai move. The 12th variable doubles its size once pressed. The variables prior to the move's execution are not the ones that seem to cause the problem.

Calling helpers
Spoiler (click to show)

[Statedef 640]
[State 1640, X]
Type = VarSet
Trigger1 = time = 0
trigger1 = pos y < (enemynear(0), pos y)
fvar(13) = (EnemyNear(0), Pos X - Pos X) * facing ;Adjust the direction towards player facing

;Finds the Y component of the vector Player, EnemyNear
[State 1640, Y]
Type = VarSet
trigger1 = time = 0
trigger1 = pos y < (enemynear(0), pos y)
fvar(14) = (EnemyNear(0), pos Y - Pos Y)

;Finds the vector length
;Formula of the length of a given vector AB
;|AB| = (AB(x)^2 + AB(y)^2)^1/2
[State 1640, Vector Length]
Type = VarSet
trigger1 = time = 0
fvar(15) = Exp(0.5*ln((fvar(13) * fvar(13))+(fvar(14) * fvar(14))))

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = ifelse((fvar(15)),-asin((fvar(13))/(fvar(15))),-45)

...

[State 200, Helper1] ;Kunai
type = Helper
trigger1 = (var(0) = 2 || var(0) = 5 ||  var(0) = 6) && animelemtime(2)=0
helpertype = normal ;player
ID = 1000
stateno = 1000
pos = 48, -29
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper5] ;Kunai
type = Helper
trigger1 = (var(0) = 9 || var(0) = 10 ||  var(0) = 11) && animelemtime(2)=0
helpertype = normal ;player
ID = 1003
stateno = 1003
pos = 48, -29
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper2] ;Shuriken
type = Helper
trigger1 = (var(0) = 3 || var(0) = 7 || var(0) = 8) && animelemtime(2)=0
helpertype = normal ;player
ID = 1001
stateno = 1001
pos = 48, -29
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper3] ;Fumma Shuriken
type = Helper
trigger1 = var(0) = 4 && animelemtime(2)=0
helpertype = normal ;player
ID = 1002
stateno = 1002
pos = 48, -29
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((random < 500),1,2.6)
size.yscale = ifelse((random < 500),1,2.6)

[State 200, Helper4] ;Kunai
type = Helper
trigger1 = (var(0) = 5 ||  var(0) = 6) && animelemtime(2)=0
helpertype = normal ;player
ID = 1000
stateno = 1000
pos = 48, -29-numhelper(1000)*7
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper4] ;Kunai
type = Helper
trigger1 = var(0) = 6 && animelemtime(2)=0
helpertype = normal ;player
ID = 1000
stateno = 1000
pos = 48, -29-numhelper(1000)*7
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper5] ;Shuriken
type = Helper
trigger1 = (var(0) = 7 || var(0) = 8) && animelemtime(2)=0
helpertype = normal ;player
ID = 1001
stateno = 1001
pos = 48, -29-numhelper(1001)*15
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper5] ;Shuriken
type = Helper
trigger1 = (var(0) = 8) && animelemtime(2)=0
helpertype = normal ;player
ID = 1001
stateno = 1001
pos = 48, -29-numhelper(1001)*15
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper4] ;Explosive Kunai
type = Helper
trigger1 = (var(0) = 9 ||  var(0) = 10) && animelemtime(2)=1
helpertype = normal ;player
ID = 1003
stateno = 1003
pos = 48, -29-numhelper(1003)*7
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

[State 200, Helper4] ;Explosive Kunai
type = Helper
trigger1 = var(0) = 11 && animelemtime(2)=2
helpertype = normal ;player
ID = 1003
stateno = 1003
pos = 48, -29-numhelper(1003)*7
postype = p1    ;p2,front,back,left,right
ownpal = 1
size.xscale = ifelse((var(5)=1),2.12,1)
size.yscale = ifelse((var(5)=1),2.12,1)

...

Projectile helpers
Spoiler (click to show)

; Kunai
[Statedef 1000]
movetype = A
ctrl = 0
anim = 6011

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(15)
value = atan((parent, fvar(13))/(parent,fvar(14)))

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(15)
x = ifelse(!(movehit),(fvar(13)/ fvar(15)) * 8.0,0)
y = ifelse(!(movehit),(fVar(14)/ fvar(15)) * 8.0,0)

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = S
x = ifelse(!(movehit),8.12,0)
y = ifelse((parent, statetype = S),0,ifelse(!(movehit),8.12,0))

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = S,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
priority = 2,Hit
damage = 17,10
pausetime = 8 ,8
guard.pausetime = 5,10
sparkxy = 0,0
hitsound = S7,0
guardsound = S4,0
ground.type = Low
ground.slidetime = 29
guard.slidetime = 14
ground.hittime = 30
guard.hittime = 15
air.hittime = 30
guard.ctrltime = 14
ground.velocity = -3,0
guard.velocity = -4
air.velocity = -1.2,.6

[State 0, Trans]
type = Trans
trigger1 = movehit
trans =  add1
alpha = (256-time*3),(256-time*3)
persistent = 0

[State 0, ReversalDef]
type = ReversalDef
trigger1 = !(parent, var(0) = 12)
reversal.attr = SCA
pause,8
sparkno = S6008
hitsound = S7,1
p1stateno = 1005

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time  = 100
trigger2 = backedgedist < -20
trigger3 = pos y <= 0
;-------------------------------------------------------------------------------
; Shuriken
[Statedef 1001]
movetype = A
ctrl = 0
anim = 6011

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse((movehit),8.13,0)
y = ifelse((parent,statetype = A),5,0)

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0 && movehit = 0
value = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = 0 && movehit = 0

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0 && movehit = 0
value = time*23

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = S,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
priority = 2,Hit
damage = 17,10
pausetime = 8 ,8
guard.pausetime = 5,10
sparkxy = 0,0
hitsound = S7,0
guardsound = S4,0
ground.type = Low
ground.slidetime = 29
guard.slidetime = 14
ground.hittime = 30
guard.hittime = 15
air.hittime = 30
guard.ctrltime = 14
ground.velocity = -3,0
guard.velocity = -4
air.velocity = -1.2,.6
hitonce = 1

[State 0, Trans]
type = Trans
trigger1 = movehit
trans =  add1
alpha = (256-time*3),(256-time*3)
persistent = 0

[State 0, ReversalDef]
type = ReversalDef
trigger1 = !(parent, var(0) = 12)
reversal.attr = SCA
pause,8
sparkno = S6008
hitsound = S7,1
p1stateno = 1005

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 100
trigger2 = backedgedist <= -15
trigger3 = pos y <= 0
;-------------------------------------------------------------------------------
; Fumma Shuriken
[Statedef 1002]
movetype = A
ctrl = 0
anim = 6011

[State 0, AfterImage]
type = AfterImage
trigger1 = !time
time = -1
palbright = 30,30,30
palcontrast = 120,120,220
palpostbright = 0,0,0
paladd = 10,10,25
palmul = .65,.65,.75
timegap = 3
framegap = 2

;Finds the X component of the vector Player, EnemyNear
;Formula to find the components of a given vector AB
;V(x) = B(x) - A(x)
;V(y) = B(y) - A(y)
[State 1640, X]
Type = VarSet
Trigger1 = time = 0
fvar(13) = (EnemyNear(0), Pos X - Pos X) * Facing ;Adjust the direction towards player facing

;Finds the Y component of the vector Player, EnemyNear
[State 1640, Y]
Type = VarSet
trigger1 = time = 0
fvar(14) = (EnemyNear(0), pos Y - Pos Y)

;Finds the vector length
;Formula of the length of a given vector AB
;|AB| = (AB(x)^2 + AB(y)^2)^1/2
[State 1640, Vector Length]
Type = VarSet
trigger1 = time = [0,20]
fvar(15) = Exp(0.5*ln((fvar(13) * fvar(13))+(fvar(14) * fvar(14))))

[State 0, VelSet]
type = VelSet
trigger1 = time = [0,20]
x = ifelse(!(movehit),(fvar(13)/ fvar(15)) * 8.0,0)
y = ifelse(!(movehit),(fVar(14)/ fvar(15)) * 8.0,0)

[State 0, AngleAdd]
type = AngleAdd
trigger1 = time = 0 && movehit = 0
value = 1

[State 0, AngleDraw]
type = AngleDraw
trigger1 = time = 0 && movehit = 0
scale = ifelse(random < 500,1,2),ifelse(random < 500,1,2)

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0 && movehit = 0
value = time*23

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = S,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
priority = 2,Hit
damage = 17,10
pausetime = 8 ,8
guard.pausetime = 5,10
sparkxy = 0,0
hitsound = S7,0
guardsound = S4,0
ground.type = Low
ground.slidetime = 20
guard.slidetime = 14
ground.hittime = 21
guard.hittime = 15
air.hittime = 21
guard.ctrltime = 14
ground.velocity = -3,0
guard.velocity = -4
air.velocity = -1.2,.6
fall = 1
fall.xvelocity = 2.3
fall.yvelocity = -4.5
fall.recover = 1
fall.recovertime = 19
fall.damage = 10
air.fall = 11
down.velocity = -2.1,1.1
down.hittime = 20
hitonce = 1

[State 0, Trans]
type = Trans
trigger1 = vel y = 0 && vel x = 0
trans =  add1
alpha = ceil(256-time*13),ceil(0+time*13)
persistent = 0

[State 0, ReversalDef]
type = ReversalDef
trigger1 = 1
reversal.attr = SCA
pause,8
sparkno = S6008
hitsound = S7,1
p1stateno = 1005

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time  = 100
;-------------------------------------------------------------------------------
; Explosive Kunai
[Statedef 1003]
movetype = A
ctrl = 0
anim = 6011

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(15)
value = atan((parent, fvar(13))/(parent,fvar(14)))

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = A
trigger1 = parent, fvar(15)
x = ifelse(!(movehit),(fvar(13)/ fvar(15)) * 8.0,0)
y = ifelse(!(movehit),(fVar(14)/ fvar(15)) * 8.0,0)

[State 0, VelSet]
type = VelSet
trigger1 = time = 0 && parent, statetype = S
x = ifelse(!(movehit),8.12,0)
y = ifelse((parent, statetype = S),0,ifelse(!(movehit),8.12,0))

[State 0, HitDef]
type = HitDef
trigger1 = 1
attr = S,NP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
hitflag = MAF        ;HLAFD+-
guardflag = MA         ;HLA
animtype = light          ;light,medium,hard,back,up,diagup
priority = 3,Hit
damage = 17,10
pausetime = 8 ,8
guard.pausetime = 5,10
sparkxy = 0,0
hitsound = S7,0
guardsound = S4,0
ground.type = Low
ground.slidetime = 29
guard.slidetime = 14
ground.hittime = 30
guard.hittime = 15
air.hittime = 30
guard.ctrltime = 14
ground.velocity = -3,0
guard.velocity = -4
air.velocity = -1.2,.6
hitonce = 1

[State 0, ReversalDef]
type = ReversalDef
trigger1 = !(parent, var(0) = 12)
reversal.attr = SCA
pause,8
sparkno = S6008
hitsound = S7,1
p1stateno = 1007

[State 0, ChangeState]
type = ChangeState
trigger1 = movehit
value = 1007
ctrl = 0

[State 0, DestroySelf]
type = DestroySelf
trigger1 = backedgedist < -20
trigger2 = pos y <= 0




The last problem I have is that the following move is not angled properly and has an unintended velocity of high speed:

Spoiler (click to show)

; Jump Strong Kick
[Statedef 650]
...


;Finds the X component of the vector Player, EnemyNear
;Formula to find the components of a given vector AB
;V(x) = B(x) - A(x)
;V(y) = B(y) - A(y)
[State 1640, X]
Type = VarSet
Trigger1 = time = 0
trigger1 = pos y < (enemynear(0), pos y)
fvar(13) = (EnemyNear(0), Pos X - Pos X) * facing ;Adjust the direction towards player facing

;Finds the Y component of the vector Player, EnemyNear
[State 1640, Y]
Type = VarSet
trigger1 = time = 0
trigger1 = pos y < (enemynear(0), pos y)
fvar(14) = (EnemyNear(0), pos Y - Pos Y)

;Finds the vector length
;Formula of the length of a given vector AB
;|AB| = (AB(x)^2 + AB(y)^2)^1/2
[State 1640, Vector Length]
Type = VarSet
trigger1 = time = 0
fvar(15) = Exp(0.5*ln((fvar(13) * fvar(13))+(fvar(14) * fvar(14))))

[State 0, AngleSet]
type = AngleSet
trigger1 = time = 0
value = ifelse((fvar(15)),-asin((fvar(13))/(fvar(15))),-45)

[State 0, VelSet]
type = VelSet
trigger1 = time = 0
x = ifelse((fvar(13)),fvar(13),5)
y = ifelse((fvar(14)),fvar(14),-5)
...

Your help will be greatly appreciated, and I will appreciate it even more if the query is satisfied. All suggestions are considered.

Odb718

Dont take this the wrong way, but this topic and it's problems are extremely convoluted. You have 5 problems listed that need to be sorted out in depth.
QuoteFor this problem, I have not been able to execute the move for this set of commands. I su.....
Is this for the problem/code above it or below it? If the thread was for one problem, there'd be no question

For the first chunk of code, what I'd suggest is make 2 triggers. Using the Or is a little much when you can just do triggeralls.
Spoiler (click to show)
[State -1, Subsitution Jutsu Alt]
type = ChangeState
value = 430
triggerall = movetype = H && ctrl   ;;; what movetype has control while being hit???
triggerall = power >= (powermax/3) | (var(6) && random <= fvar(18)*1.1)  ;;; What is the single | doing???
triggerall = command != "holddown" && command != "holdfwd" && command = "holdback"
trigger1 = command = "y"
trigger2 = (command = "x") && (power >= floor(powermax/2.5))

Just a general tip. Stuff like
trigger1 = (var(0) = 2 || var(0) = 5 ||  var(0) = 6) && animelemtime(2)=0
when it's not working, break it down into multiple triggers. What I read I'm seeing

trigger1 = var(0) = 2
trigger2 = var(0) = 5
trigger3 = var(0) = 6 && animelemtime(2)=0

but I have a feeling you'd want

triggerall = animelemtime(2)=0  ;try switching this up using this guide
trigger1 = var(0) = 2
trigger2 = var(0) = 5
trigger3 = var(0) = 6

Once it works perfect, then go back and simplify it to a few lines. If it breaks, expand it and retry. Using a trigger1 can trigger multiple times so if you're worried about it firing off 3x you can use
triggerall = animelemtime(2)=0
trigger1 = (var(0) = 2) || (var(0) = 5) ||  (var(0) = 6)

QuoteOne of its errors is that the target moves away from the player.
This problem could be it's own entire thread. Is it moving away because of the animation, or a smooth velocity,
and as I scroll down to reread the problem, I cant find it easy because all of the other problems are bunched together.
vVv Gouken718 vVv SabreTooth718 vVv


Fighting Toys Freak

Thank you, Odb718. I have already fixed most of the problems for my character through some debugging. However, my character has been experiencing one issue. How could I address the problem in the following code. The following state definition has been persisting the same problem:


...
[Statedef 2001]
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = target, power != 0
value = 210
elem = 3

[State 0, TargetBind]
type = TargetBind
trigger1 = time = 0
pos = 35, -7

[State 2010, Throw]
type = TargetState
trigger1 = AnimElem = 1
value = 820

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = timemod = 30, 0
value = -20
kill = 0
ignorehitpause = 1

[State 0, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = timemod = 30, 0
value = -20
ignorehitpause = 1

[State 0, LifeAdd]
type = LifeAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = timemod = 30, 0
value = 20
ignorehitpause = 1

[State 0, PowerAdd]
type = PowerAdd
trigger1 = target(2001), power = 0
value = 550
ignorehitpause = 1
persistent = 0

[State 0, PalFXWiz]
type = PalFX
trigger1 = 1
add = -104,-104,7
mul = 256,256,256
sinadd = 56,56,0,10

...

Odb718

How am I just supposed to guess what the problem is? We need to know the symptoms of the problem in order to fix it. Just knowing there IS a problem isnt enough. You have 8 different things that could be causing you a problem. Which one is it?
vVv Gouken718 vVv SabreTooth718 vVv