YesNoOk
avatar

Hitsparks are way offset (Read 432 times)

Started by Punkxy, January 25, 2020, 09:09:45 PM
Share this topic:
Hitsparks are way offset
#1  January 25, 2020, 09:09:45 PM
  • **

  • Online


The problem occurs for any attack in her movelist, except maybe specials for some reason..
I tried changing sparxy numbers, it affected nothing.
Tried changing:
sparkno = -1;s10000
guard.sparkno = -1;s10120

into
sparkno = s10000
guard.sparkno = s10120

and it does make a hitspark in the correct spot, but for some reason also the previous offset spark appears together with it



This is the code for one of the attacks for example:
;‹A
;---------------------------------------------------------------------------
[Statedef 200]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 200
sprpriority = 2

[State ]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA

getpower = ceil(var(12)*2*(var(21)<1))
damage = var(12), 0
guard.kill = 0

animtype = Light
guardflag = MA
hitflag = MAF

priority = 3, Hit
pausetime = 10, 10

sparkno = -1;s10000
guard.sparkno = -1;s10120
sparkxy = -10, -58
hitsound = s200, 5
guardsound = s120, 0

ground.type = High
ground.slidetime = 14
ground.hittime  = 12
ground.velocity = -3.5
guard.ctrltime  = 10

air.type = low
airguard.velocity = -1.9,-.8
air.velocity = -1.4,0

p2facing = 1
air.hittime = 999

ID = 200
;---------------------------------------------------------------------------


help :c
Last Edit: January 25, 2020, 11:39:38 PM by someasome
Re: Hitsparks are way offset
#2  January 25, 2020, 09:45:54 PM
  • ****
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 Is the hitspark animation itself misaligned? If not, the hitspark itself may possibly be generated with an explod or helper. As a matter of fact, I've been currently using these exact hitsparks for Eri and had to resort to making them spawn via explod since their hi-res nature made them too large for a hitdef to spawn it directly.
Re: Hitsparks are way offset
#3  January 25, 2020, 10:06:58 PM
  • **

  • Online
Is the hitspark animation itself misaligned? If not, the hitspark itself may possibly be generated with an explod or helper. As a matter of fact, I've been currently using these exact hitsparks for Eri and had to resort to making them spawn via explod since their hi-res nature made them too large for a hitdef to spawn it directly.
I think they are aligned by what I see..
Any idea how to fix that?
Last Edit: January 25, 2020, 10:23:23 PM by someasome
Re: Hitsparks are way offset
#4  January 25, 2020, 10:59:22 PM
  • ****
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 Check for any explods or helpers whose animation correspond to the hitspark animation. Usually, they'll have a movehit/movecontact trigger of some sort in them.

 An example that I use which could help make it a little easier to visualize an idea of what to look for is this.

Quote
[State 200, Spark]
Type = Explod
triggerall = numtarget
triggerall = !numexplod(6000)
trigger1 = movecontact
anim = 6000+1*moveguarded
ID = 6000
pos = floor(p2dist x),floor(target,pos y-55-cond(anim = 205,0,10))
postype = P1
ownpal = 1
scale = (const(size.xscale))*cond(movehit,0.8,1.2),(const(size.yscale))*cond(movehit,0.8,1.2)
sprpriority = 40
SuperMoveTime = 999
PauseMoveTime = 999
ignorehitpause = 1
persistent = 0

 In these cases, whatever sparkxy value is in the hitdef would be irrelevant because the explod or helper would determine spark position instead.
Re: Hitsparks are way offset
#5  January 25, 2020, 11:38:59 PM
  • **

  • Online
Oh I managed to fix it!
I changed the animations of the sparks group number from 10,000 to just a higher number that ain't taken (40,000 in my case), that removed all the hitsparks, and then I changed any:
sparkno = -1 ;s10000
guard.sparkno = -1; s10120

to:
sparkno = s40000
guard.sparkno = s10120

and now they are pretty much in place, some attacks require some repositioning but I tried and it works so overall that solved my problem!
thanks for the replies Nep!