YesNoOk
avatar

Air Helper Hitspark (Read 2121 times)

Started by BurningSoul, June 21, 2019, 03:40:16 pm
Share this topic:
Air Helper Hitspark
#1  June 21, 2019, 03:40:16 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
so just wanted to add helper sparks to a character but



this is whats happening,it sometimes looks ok,and sometimes it appears somewhere else

sparkno = -1 + 0 * (var(33) := 8010)
guard.sparkno = -1 + 0 * (var(34) := 8000)
sparkxy = -10 + 0 * (var(35) := 155), var(36):= -90
Last Edit: June 22, 2019, 01:45:52 pm by Mark85
Re: Air Helper Hitspark
#2  June 22, 2019, 06:27:03 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Sparkxy is the field you care about. X is unimportant as it is almost always based around the midpoint of the character. Y is normally based on where the hit occurs. According to the code there thats a y pos of 155 pixels below the character.

Without seeing how the helper actually positions itself i can't say more that that.


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: Air Helper Hitspark
#3  June 22, 2019, 01:46:58 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
[State -2, Sparks]
type = helper
triggerall = movecontact = 1 && var(31) = hitpausetime
trigger1 = movehit = 1 && numenemy
trigger1 = var(33) = 8010 || var(33) = 8011 || var(33) = 8012 || var(33) = 8013 || var(33) = 8014 || var(33) = 8001
trigger2 = moveguarded = 1 && numenemy
trigger2 = var(34) = 8000 || var(34) = 8001
trigger3 = MoveHit = 1 && NumEnemy
trigger3 = var(33) = 8015 || var(33) = 8016 || var(33) = 8017
stateno = ifelse(moveguarded, var(34), var(33))
ID = 8000
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 = 65535
supermovetime = 65535
ignorehitpause = 1





Re: Air Helper Hitspark
#4  June 24, 2019, 03:38:17 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
That's a pretty complex calculation to solve the "X" position, but if you can understand the calculations in that parameter, you'll find that the "Y" position is simply "var(36)"

You'll have to hunt down the code that is responsible for var(36) to figure this out.


*Edit* Does the helper have those vars?  If those vars are all set by the player then you may just need to add this to the beginning of them
parent,

example

pos = ifElse(P2Dist x < 0, 0, ifElse(P2Dist x < parent,var(35), ceil(P2Dist x), parent,var(35))), parent,var(36)

Last Edit: June 24, 2019, 03:42:46 pm by altoiddealer
Re: Air Helper Hitspark
#5  June 24, 2019, 05:50:02 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
tried this parent thing above,it broke sparks more so I returned to current version
Re: Air Helper Hitspark
#6  June 25, 2019, 04:53:36 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Well like I said, no one will be able to help you until you find where var(36) is being set.

Please find that and copy/paste it here, because that contains the calculations for the Y position of the sparks.

Re: Air Helper Hitspark
#7  June 25, 2019, 05:01:25 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
just figured super cancel system was using the same var,could that cause sth?

also only have those
[State -2, Hit Detection]
type = varset
trigger1 = 1
var(31) = -1

[State -2, Hit Detection]
type = varrangeset
trigger1 = movetype = I
trigger2 = movetype = H && time
first = 31
last = 36
value = -1
ignorehitpause = 1
Re: Air Helper Hitspark
#8  June 25, 2019, 07:21:47 pm
  • ****
    • crepa.neocities.org
These only nulls the sparks when you're not attacking. Post the cancel system states here so we can take a look.
Also use ctrl+f in Fighter Factory to search for var(36) and see if another state is using it for something else other than the sparks position.
Re: Air Helper Hitspark
#9  June 25, 2019, 08:17:56 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
I changed Super Cancel var into sth else and it seems to work now.