YesNoOk
avatar

DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE (Read 2521 times)

Started by Keymon2324, January 07, 2025, 04:35:45 pm
Share this topic:
DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE
#1  January 07, 2025, 04:35:45 pm
  • avatar
  • *
    • Austria
I HAVE AN ISSUE IN MY CHARACTER IS THAT WHEN I TRY TO ATTACK FROM FAR IT HAS HIGH DAMAGE WHILE NEAR IT HAS LOW DAMAGE. ANYONE HELPS ME TO FIGURE OUT THE ISSUE. EVEN I HAD CHANGED DAMAGE VALUE TO SOMETHING 50,7 BUT STILL IT DOESN'T WORK

[StateDef 1500]
type = A
physics = N
moveType = A
ctrl = 0
velSet = 0,0
sprPriority = 1
powerAdd = 72
faceP2 = 1
juggle = 6

[State 1500, Explod]
type = Explod
trigger1 = Time = 0
anim = 2224
ID = 2224
pos = -30,20
postype = p1
facing = 1
vfacing = 1
bindtime = 1
scale = 1,1
sprpriority = 0
ontop = 1
ownpal = 1
removeongethit = 1
ignorehitpause = 1
persistent = 1
supermovetime = 9999
pausemovetime =  9999

[State 1500, VarSet]
type = VarSet
trigger1 =!AILevel&& time =0
var(10) = ifelse(command="a",0,ifelse(command="b",1,2))
ignorehitpause = 1
[State 1500, VarSet]
type = VarSet
trigger1 =AILevel&& time =0
var(10) = ifelse(random<300,1,2)
ignorehitpause = 1
[State 1500, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 1500+var(10)

[State 1500, Voice]
type = PlaySnd
trigger1 = !Time
value = 4,4 + 9 * var(1)
channel = 0
[State 1500, VarSet]
type = VarSet
trigger1=time=0
var(11)=Ifelse(var(10)=2,1,0)
ignorehitpause = 1
[State 0, Helper]
type = Helper
trigger1 =animelem=5&&!Numhelper(1515)&&var(10)=2
helpertype = normal
name = "Tatsumaki-fx"
ID =1515
stateno =1515
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =.5
size.yscale =.5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1=!var(10)&&animelem=11
trigger2=var(10)=1&&animelem=29
value = 1500+var(10)
elem = 35
ignorehitpause =1
persistent=0

[State 1500, Woosh Sound]
type = PlaySnd
trigger1 = AnimElem = 1
trigger2 = AnimElem = 9
trigger3 = AnimElem = 15
trigger4 = AnimElem = 21
trigger5 = AnimElem = 27
trigger6 = AnimElem = 33
value = 1,4
channel=Ifelse((animelem=1||animelem=12||animelem=21||animelem=30),1,Ifelse((animelem=5||animelem=15||animelem=24||animelem=33),2,3))

[State 1500, Fire Sound]
type = PlaySnd
triggerall=var(10)=2
trigger1 = AnimElem = 5
trigger2 = AnimElem = 15
trigger3 = AnimElem = 24
trigger4 = AnimElem = 33
value = 5,1
channel=Ifelse((animelem=5),4,Ifelse((animelem=15),5,Ifelse((animelem=24),6,7)))

[State 1500, Velocity]
type = PosAdd
trigger1=!time
x = 9.5
[State 1500, Velocity]
type = VelSet
trigger1= AnimElem = 1, = 2
x=2
y=-3

[State 1500, VelMul]
type = VelMul
trigger1 = AnimElemTime(37) >= 0
x = 0.96
[State 1500, Gravity]
type = VelAdd
trigger1=AnimElemTime(37) >= 0
y = 0.45

[State 1500, Dust Helper]
type = Helper
trigger1 = AnimElem = 1
helperType = Normal
stateNo = 8100
ID = 8100
name = "Tatsumaki Senpukyaku Dust"
posType = P1
ownPal = 1

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

[State 1500, First Hit]
type = HitDef
trigger1 = AnimElem = 1
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage =Ifelse(!var(10),50,30), 7
getPower = Ifelse(!var(10),30,10)
givePower = 36, 36
pauseTime = 10,10
guard.pauseTime = 10,10
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 20
guard.ctrlTime = 20
air.hitTime = 120
ground.velocity = -1,-6
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -2, -5
air.cornerPush.velOff = 0
fall = 0
air.fall = 0
forceStand = 1
hitSound = s2,5
guardSound = s3,0
sparkNo = s8010+random%8
guard.sparkNo = s7105
sparkXY = -10,-60
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1500, Air Hits]
type = HitDef
trigger1 = AnimElem = 7 || AnimElem = 10
trigger2 = var(10) && (AnimElem = 13 || AnimElem = 16 || AnimElem = 19 || AnimElem = 22 || AnimElem = 25 || AnimElem = 28)
trigger3 = var(10) = 2 && (AnimElem = 31 || AnimElem = 34)
id=1500
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = Ifelse(!var(10),40,Ifelse(var(10)=1,25,20)), 7
getPower = Ifelse(!var(10),30,Ifelse(var(10)=1,15,10))
givePower = Ifelse(!var(10),30,Ifelse(var(10)=1,15,10))
pauseTime = 8,8
guard.pauseTime =8,8
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 20
guard.ctrlTime = 20
air.hitTime = 120
ground.velocity = -2, -6
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -2.5, -5
air.cornerPush.velOff = 0
fall = 0
air.fall = 1
fall.recover = 0
fall.recoverTime = 120
forceStand = 1
hitSound = s2,5
guardSound = s3,0
sparkNo = s8010+random%8
guard.sparkNo = s7105
sparkXY = -10,-70
palFX.time = 48*var(11)
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1500, HitSound]
type = playsnd
trigger1 = movehit && numtarget &&(enemynear,stateno=[5000,5030])
trigger1 = !(target, time) && (target, movetype = H)&&var(11)
value = 5,2
ignorehitpause = 1

[State 1500, flames]
type = helper
trigger1 = animelemtime(5)>=0&&movehit && numtarget && !numhelper(7180)&&(enemynear,stateno=[5000,5030])
trigger1 = !(target, time) && (target, movetype = H)&&var(11)
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
bindtime = 1000
ownpal = 1
facing = -1
size.ground.front = 0
size.ground.back = 0
ignorehitpause = 1

[State 0, p1state]
type=changestate
triggerall= movehit && numtarget(1500)
triggerall= target(1500),Movetype=H
trigger1=animelem=35
value=1505
ignorehitpause=1
[State 1500, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1201
;========================<RORINGU SENPUKYAKU>=============================
[StateDef 1505]
type = A
physics = N
moveType = A
anim=1505
ctrl = 0
velSet = 0,0
sprPriority = 1
faceP2 = 1

[State 1505, ChangeAnim]
type = ChangeAnim
trigger1=anim=1505&&!animtime
value = 1500+var(10)
elem=35
ignorehitpause=1
persistent=0

[State 1505, Voice]
type = PlaySnd
trigger1 = !Time
value = 820-10*var(1),0+10*var(1)
channel = 0
[State 1500, VarSet]
type = VarSet
trigger1=time=0
var(11)=Ifelse(var(10)=2,1,0)
ignorehitpause = 1
[State 0, Helper]
type = Helper
trigger1 =anim=1505&&animelemtime(7)<0&&var(10)=2
helpertype = normal
name = "Tatsumaki-fx"
ID =1525
stateno =1525
pos = 0,0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
size.xscale =.5
size.yscale =.5

[State 0, ChangeAnim]
type = ChangeAnim
trigger1=!var(10)&&animelem=10
value = 1500+var(10)
elem = 35
ignorehitpause =1
persistent=0
[State 1505, Woosh Sound]
type = PlaySnd
trigger1 = anim=1505&&AnimElem = 2
value = 1,4
channel=1

[State 1505, Fire Sound]
type = PlaySnd
triggerall=var(10)=2
trigger1 = anim=1505&&AnimElem =3
value = 5,1
channel=4

[State 0, VelSet]
type = VelSet
trigger1 =anim=1505&&animelem=2
x = 3
y =-3
[State 1505, Gravity]
type = VelAdd
trigger1=anim!=1505
y = 0.45
[State 1505, StateTypeSet: Idle]
type = StateTypeSet
trigger1 =AnimElemTime(8) >= 0
moveType = I

[State 1505, Air Hits]
type = HitDef
trigger1 =!time
attr = A, SA
hitFlag = MAF
guardFlag = MA
priority = 4, Hit
damage = 30+10*var(10), 7
getPower = 20,20
givePower =30,30
pauseTime = 8,8
guard.pauseTime =8,8
animType = Hard
air.animType = Back
fall.animType = Back
ground.type = High
air.type = Low
ground.hitTime = 18
ground.slideTime = 18
guard.hitTime = 20
guard.ctrlTime = 20
air.hitTime = 120
ground.velocity = -12, 12
ground.cornerPush.velOff = 0
guard.velocity = -10.52
guard.cornerPush.velOff = 0
air.velocity = -12, 12
air.cornerPush.velOff = 0
fall = 1
air.fall = 1
fall.recover = 0
air.recover=0
fall.recoverTime = 120
forceStand = 1
hitSound = s2,5
guardSound = s3,0
sparkNo = s8010+random%8
guard.sparkNo = s7105
sparkXY = -10,-70
palFX.time = 48*var(11)
palFX.mul = 128, 128, 128
palFX.sinAdd = 96, 96, 96, 4
envShake.time = 14
envShake.ampl = 4
envShake.freq = 120

[State 1505, HitSound]
type = playsnd
trigger1 = movehit && numtarget &&(enemynear,stateno=[5000,5030])
trigger1 = !(target, time) && (target, movetype = H)&&var(11)
value = 5,2
ignorehitpause = 1

[State 1505, flames]
type = helper
trigger1 = animelemtime(5)>=0&&movehit && numtarget && !numhelper(7180)&&(enemynear,stateno=[5000,5030])
trigger1 = !(target, time) && (target, movetype = H)&&var(11)
helpertype = normal
stateno = 7180
ID = 7180
name = "flames"
postype = p2
bindtime = 1000
ownpal = 1
facing = -1
size.ground.front = 0
size.ground.back = 0
ignorehitpause = 1

[State 1505, ChangeState]
type = ChangeState
trigger1 = pos y > -vel y
value = 1201
Re: DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE
#2  January 07, 2025, 09:10:47 pm
  • *
Still dealing different damages after testing like damage = 50, 7?  My guess is, somewhere in Statedef -2 or -3 (or even -1) some code like type = AttackMulSet is influencing damages, or some unexpected Projectiles/Helpers, or the opponent is being TargetStated/TargetLifeAdded, or the opponent changes get hit damages by its own?  :thinking2:
Re: DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE
#3  January 08, 2025, 03:21:00 am
  • avatar
  • *
    • Austria
I tried to play with every opponent but still dealing different damages when attack from far and near.

There is one code under statedef -2

[State -2, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1

I dont' know what the issue
Re: DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE
#4  January 08, 2025, 03:28:30 am
  • *
I tried to play with every opponent but still dealing different damages when attack from far and near.

There is one code under statedef -2

[State -2, Dampener itself]
type=attackmulset
trigger1= 1
value=fvar(10)
ignorehitpause=1

I dont' know what the issue


Okay, fvar(10) is not in your [StateDef 1500] and [StateDef 1505], it must be in somewhere else, and it is influencing damages, go to find out what this fvar(10) is all about.

Re: DAMAGE VARIES WHEN ATTACK FROM FAR AND CLOSE
#5  January 08, 2025, 03:49:17 am
  • avatar
  • *
    • Austria
This is a helper . May be i think issue in this?

[Statedef 1515]
physics=N
velset=0,0
sprpriority=-1

[State 0, Helper]
type = Helper
trigger1 =!time
helpertype = normal ;player
name ="flame"
ID =1516
stateno =1516
pos = 0,0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 9999
pausemovetime = 9999

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =!time
trigger2 =root,animelem=11||root,animelem=17||root,animelem=23||root,animelem=29||root,animelem=35
value = 1215
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=67||root,animelem=12||root,animelem=18||root,animelem=24||root,animelem=30||root,animelem=36
value = 1216
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=8||root,animelem=14||root,animelem=20||root,animelem=26||root,animelem=32||root,animelem=38
value = 1217
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=9||root,animelem=15||root,animelem=21||root,animelem=27||root,animelem=33||root,animelem=39
value = 1218
ignorehitpause =1

[State 0, SprPriority]
type = SprPriority
trigger1 =root,animelem=6||root,animelem=12||root,animelem=18||root,animelem=24||root,animelem=30||root,animelem=36
value = 5
ignorehitpause =1
[State 0, SprPriority]
type = SprPriority
trigger1 =root,animelem=11||root,animelem=17||root,animelem=23||root,animelem=29||root,animelem=35
value = -1
ignorehitpause =1
[State 1515, noshadow]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 1515, Assert]
type=trans
trigger1=root,animelemtime(31)>=0
trans=addalpha
alpha=256-4*time,256
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1=root,animelemtime(31)>=0
scale =1,1+.0125*time
ignorehitpause =1

[State 0, BindtoParent]
type = BindtoParent
trigger1=1
pos = 5,-78
ignorehitpause =1

[State 1515, end]
type=destroyself
trigger1=root,stateno!=1500&&root,stateno!=1550&&root,stateno!=3200
trigger2=root,Movetype=H
trigger3=root,stateno=1500&&root,animelemtime(35)>=0
trigger4=root,stateno=1550&&root,animelemtime(35)>=0
trigger5=root,stateno=3200&&root,animelemtime(35)>=0


;---------------------------------------------------------------------------
[Statedef 1516]
physics=N
velset=0,0
sprpriority=-1

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =!time
trigger2 =root,animelem=11||root,animelem=17||root,animelem=23||root,animelem=29||root,animelem=35
value = 1215
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=67||root,animelem=12||root,animelem=18||root,animelem=24||root,animelem=30||root,animelem=36
value = 1216
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=8||root,animelem=14||root,animelem=20||root,animelem=26||root,animelem=32||root,animelem=38
value = 1217
ignorehitpause =1
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =root,animelem=9||root,animelem=15||root,animelem=21||root,animelem=27||root,animelem=33||root,animelem=39
value = 1218
ignorehitpause =1

[State 0, SprPriority]
type = SprPriority
trigger1 =root,animelem=6||root,animelem=12||root,animelem=18||root,animelem=24||root,animelem=30||root,animelem=36
value = 5
ignorehitpause =1
[State 0, SprPriority]
type = SprPriority
trigger1 =root,animelem=11||root,animelem=17||root,animelem=23||root,animelem=29||root,animelem=35
value = -1
ignorehitpause =1
[State 1516, noshadow]
type=assertspecial
trigger1= 1
flag=noshadow
ignorehitpause=1
[State 1516, Assert]
type=trans
trigger1=root,animelemtime(31)>=0
trans=addalpha
alpha=256-4*time,256
ignorehitpause=1
[State 0, AngleDraw]
type = AngleDraw
trigger1=root,animelemtime(31)>=0
scale =1,1+.0125*time
ignorehitpause =1

[State 0, BindtoParent]
type = BindtoParent
trigger1=1
pos = 0,6
ignorehitpause =1

[State 1516, end]
type=destroyself
trigger1=root,stateno!=1500&&root,stateno!=1550&&root,stateno!=3200
trigger2=root,Movetype=H
trigger3=root,stateno=1500&&root,animelemtime(35)>=0
trigger4=root,stateno=1550&&root,animelemtime(35)>=0
trigger5=root,stateno=3200&&root,animelemtime(35)>=0