YesNoOk
avatar

Trouble timing P.o.t.S hitsparks (Read 3819 times)

Started by Jeni2147, September 18, 2021, 07:48:52 am
Share this topic:
Trouble timing P.o.t.S hitsparks
#1  September 18, 2021, 07:48:52 am
  • People say it don't be like it be, but it do
    • Malaysia
So I'm currently coding an attack on my character and using helpers as hitsparks referencing P.o.t.s' characters

But in game it seems to only trigger when the pausetime is over



I can't really figure out why it's this way

The hitdef stctrl

[State 200, Hit]
type = HitDef
trigger1 = animelem = 3
attr = S, NA
hitflag = MAF
guardflag = MA
animtype = Light
air.animtype = Back
priority = 3, Hit
damage = 15,3
pausetime = 8,8
sparkno = -1 + 0 * (var(33) := 7010)
guard.sparkno = -1 + 0 * (var(34) := 7000)
sparkxy = -10 + 0 * (var(35) := 46), var(36):= -41
hitsound = s2,0
guardsound = s3,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
air.hittime = 10
guard.ctrltime = 10
yaccel = .5
ground.velocity = -2
air.velocity = -4,-5
fall.recover = 1
getpower = 70, 35
givepower = 35, 35
palfx.time = 12 * var(2)
palfx.add = 255, 255, 255
palfx.sinadd = -255, -255, -255, 48


The hitspark helper stctrl

[State -2, Hit Sparks]
type = Helper
triggerall = movecontact = 1 && var(30) = hitpausetime
trigger1 = movehit = 1 && numenemy
trigger1 = var(33) = 7010 || var(33) = 7030
trigger2 = moveguarded = 1 && numenemy
trigger2 = var(34) = 7000 || var(34) = 7001 || var(34) = 7002
helpertype = Normal
stateno = ifelse(moveguarded, var(34), var(33))
ID = 7000
name = "Spark"
postype = P1
pos = ifElse(p2dist x < 0, 0, ifElse(p2dist x < var(35), ceil(p2dist x), var(35))), var(36)
facing = -1
ownpal = 1
pausemovetime = 2147483647
supermovetime = 2147483647
ignorehitpause = 1


Hoping for anyone to help point out what's causing this  :sweatdrop:
Last Edit: September 18, 2021, 07:56:34 am by Jeni2147
Re: Trouble timing P.o.t.S hitsparks
#2  September 21, 2021, 11:46:13 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Whats the code for setting var(30)? That looks like your most limiting factor. Take that out of the helper trigger and see if it works. It'll probably work wrong but you should get a spark to appear.


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: Trouble timing P.o.t.S hitsparks
#3  March 25, 2022, 03:36:58 pm
  • People say it don't be like it be, but it do
    • Malaysia
Sorry for replying 6 months late
Yeah var(30) was exactly the problem and it's working well now thank you now I just need to limit the number of explods to 1 per hit