YesNoOk
avatar

Newly Implemented Move not recognised as an Attack? (Read 262 times)

Started by RagingRowen, May 27, 2019, 03:03:23 am
Share this topic:
Newly Implemented Move not recognised as an Attack?
#1  May 27, 2019, 03:03:23 am
  • ****
  • The Quality Assurance Boy
    • UK
I'm currently editing DW's Robert to feature a new move, that being the 98' Ryuu Zanshou, using Vans' Robert for reference. I am using the Ryuuga as a basis for the new move, but when he executes it, it won't hit nor cause p2 to guard. Getting this correct is my first priority.
Code:
;========================<Ryu Zanshou>=======================
[Statedef 1600]
type = S
movetype = A
physics = S
anim = 1600
ctrl = 0
velset = 0,0
poweradd = 70 * !var(20)
sprpriority = 2
facep2 = 1

[State 1100, Voice]
type = PlaySnd
trigger1 = AnimElem = 1
value = 1100,0
channel = 0

[State 1100, Swing Snd]
type = PlaySnd
trigger1 = Animelem = 1
value = 1, 2
channel = 2

[State 1100, Jump Snd]
type = PlaySnd
trigger1 = AnimElem = 3
value = 40,0
channel = 3

[State 1100, StateTypeSet: Air, No Phys]
type = StateTypeSet
trigger1 = AnimElem = 3
stateType = A
physics = N

[State 1100, Dust Helper]
type = Helper
trigger1 = AnimElem = 3
helperType = Normal
stateNo = 8100
ID = 8100
name = "Jump Dust"
posType = P1
ownPal = 1

[State 1100, Width]
type = Width
trigger1 = 1 
edge = 8,0

[State 1100, Muteki]
type = Nothitby
trigger1 = AnimElemTime(3) < 0
time = 1
value = SCA

[State 1100, VelAdd]
type = VelAdd
trigger1 = AnimElem = 1
x = 1.15

[State 1100, PosAdd]
type = PosAdd
trigger1 = AnimElem = 2
x = 3.5

[State 1100, Rising Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 3
y = -5.5

[State 1100, Friction]
type = VelAdd
trigger1 = vel x > 0
trigger1 = AnimElemTime(3)>0
x = -0.03

[State 1100, VelStop]
type = VelSet
trigger1 = AnimElemTime(3) = 8
x = 0

[State 1100, Gravity]
type = VelAdd
trigger1 = AnimElemTime(3) > 0
y = 0.5

[State 1100, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 4
attr = A, SA
damage = ceil(ifElse(fvar(11) * 91 < 7, 7, fvar(11) * 91)), 7
priority = 4, hit
animtype = Hard
getpower = 70 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 12,12
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 60), var(36) := -68
air.animtype = Back
fall.animtype = Back
ground.type = Low
air.type = Low
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2,-8
air.velocity = -2,-8
guard.velocity = -10
;airguard.velocity = -6, -4
;airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1100, Hit]
type = HitDef
trigger1 = !var(16) && var(15) < 1
trigger1 = AnimElem = 5
attr = A, SA
damage = ceil(ifElse(fvar(11) * 56 < 7, 7, fvar(11) * 56)), 7
priority = 4, hit
animtype = Hard
getpower = 70 * !var(20), 30 * !var(20)
givepower = 35, 35
guardflag = MA
hitflag = MAF
hitsound = S2,2
guardsound = S130,0
pausetime = 10,10
guard.pausetime = 12,12
sparkNo = -1 + 0 * (var(33) := 8013)
guard.sparkNo = -1 + 0 * (var(34) := 8001)
sparkXY = -10 + 0 * (var(35) := 17), var(36) := -140
air.animtype = Back
fall.animtype = Back
ground.type = High
air.type = High
ground.slidetime = 18
ground.hittime  = 18
guard.hittime = 18
ground.velocity = -2, -8
air.velocity = -2, -8
guard.velocity = -10
airguard.velocity = -6, -4
airguard.ctrlTime = 16
ground.cornerPush.velOff = 0
guard.cornerPush.velOff = 0
air.cornerPush.velOff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
palFX.time = 12 * var(9)
palFX.add = 255,255,255
palFX.sinAdd= -255,-255,-255,48
envshake.time = 14
envshake.ampl = 4
envShake.freq = 120

[State 1100, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I

[State 1100, End]
type = ChangeState
trigger1 = AnimElemTime(4)>0
trigger1 = Pos Y >= 0 && Vel Y > 0;pos y > -vel y
value = 1601

;Landing
[Statedef 1601]
type = S
movetype = I
physics = S
ctrl = 0
anim = 1601
velset = 0, 0

[State 1105, On Ground]
type = Posset
trigger1 = !Time
Y = 0

[State 1105, EX Flash]
type = VarSet
triggerall = PrevStateNo=1130
trigger1 = !Time
var(25) = 5

[State 1105, Land Snd]
type = PlaySnd
trigger1 = Time = 1
value = 52,0

[State 1105, Landing Dust Explod]
type = Explod
trigger1 = !Time
anim = 8102
sprpriority = -3
postype = P1
pos = 5, 0
scale = 0.5,0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1

[State 1105, End]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1

DS

Re: Newly Implemented Move not recognised as an Attack?
#2  May 27, 2019, 03:21:21 am
  • ***
  • aka DeathScythe
    • deathscythemugen.neocities.org
This is because the move type is not = A (attack).
This part on your code:
Code:
[State 1100, StateTypeSet: Idle]
type = StateTypeSet
trigger1 = AnimElemTime(4) >= 0
moveType = I
Is probably changing the state to Idle before the attack connects. Try removing it just for a test.
Re: Newly Implemented Move not recognised as an Attack?
#3  May 27, 2019, 03:23:52 am
  • ****
  • The Quality Assurance Boy
    • UK
I changed it and it's hits now. Weird because it was in the Ryuuga code yet that hit.

DS

Re: Newly Implemented Move not recognised as an Attack?
#4  May 27, 2019, 03:39:02 am
  • ***
  • aka DeathScythe
    • deathscythemugen.neocities.org
You need to set the move to Idle at the right time. You know about the 3 phases of a move, right? Startup, hit, and recovery. Startup = before the move connects, hit = when the move connects, recovery = after the move connects. Before and during the hit, the movetype should be A (attack), and during the recovery, it should be I (idle).
If the anim for a move have, say, 10 different frames, and 1~3 is the startup, 4~6 is the hit (the red colision boxes goes here), and 7~10 is the recovery, it should be set to Idle at frame 7, after all the red colision boxes have appeared. The character you took the code from probably have a different animation for that move.
Sorry if this is too complicated, I tried my best to explain.

In resume, you need to set the frame after all the red colision boxes have appeared here:
    [State 1100, StateTypeSet: Idle]
    type = StateTypeSet
    trigger1 = AnimElemTime(4) >= 0
    moveType = I