YesNoOk
avatar

How does POTS method hitpsparks work? (Read 3860 times)

Started by BurningSoul, August 26, 2017, 05:09:24 pm
Share this topic:
How does POTS method hitpsparks work?
#1  August 26, 2017, 05:09:24 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
Basically I have been wondering how POTS sparks work I want to code something similar into my add004's common1.cns that I can use with my roster.I would really appreciate if someone could tell it to me,Like how do you guys position sparkxy so it fits the character
Re: How does POTS method hitpsparks work?
New #2  August 26, 2017, 06:06:36 pm
  • ****
  • Objection! Sustained!
    • Russia
    • mitia.pogorelov1@yandex.ru
It's very complex, but I think I can explain it to you.
First of all: the Hitspark itself it not Explod, but Helper: a state with numerous of modifiers like AngleAdd to spin main part and Explods with ModifyExplods. So, your FIRST work will be compilating that hitspark of yours, doing experiments on it, modifying and polishing it.
Secondly: your HitDefs. You see, it really has specific values for their HitSparks, BlockSparks and positions for both of them. They're all looks like THAT:
sparkNo = -1 + 0 * (var(33) := 8010)
You see, this code is written to not give HitSpark by itself, but to SET used variable to character itself via HitDef. There are 4 variables you need to know:
-Var(33)- HitSpark StateNo.
-Var(34)- BlockSpark StateNo.
-Var(35)- Helper's positioning on X.
-Var(36)- Helper's positioning on Y.
Thirdly: if this is state, then you need an Helper CODE to use it, right. Well, in P.o.T.S. styled characters it's done in harder, but more compact way. Helper code itself is situated in Statedef -2, always executed state. Its triggers are variables 33 & 34, conditions for them- movehit for 33 and moveblocked for 34 accordingly. Stateno, used by helper code, depends on which variable is active and which value it has, and position depends on variables 35 and 36, with couple of extra codes for extra repositioning.
So, let's get it in more straight way: every HitDef in character sets variables used to control one and only Helper code for HitSparks in the whole character. It sets Var(33) to use necessary HitSpark. It sets Var(34) to use necessary BlockSpark. It sets Var(35) and Var(36) to change Helper's position.
That's how it looks when we'll draw it.

You get now, how it works? Now go watch some codes themselves to get more clear picture.
Last Edit: August 26, 2017, 06:13:14 pm by Trololo