Yeah, Felicia's Cat Ride uses sysvar(0) to store the position when not in the standard states that use it.
[State -2, Cat Ride Pos]
type = VarSet
trigger1 = Enemy, AuthorName = "Jesuszilla"
trigger1 = Enemy, Name = "Felicia" || Enemy, Name = "Felicia_LG"
trigger1 = StateNo != 132 && StateNo != 155 ; Air guard
trigger1 = StateNo != [5000,5999] ; Gethits
sysvar(0) = (7 & 65535) | (-65 * 65536)
; x y
; Range for Pos X and Pos Y is [-32768,32767] (INT16)
; Pos XもPos Yの範囲は[-32768,32767]です。 (INT16)
We totally need to make better use of the sysvars, especially within helpers which get their own. That's the entire basis for Vans's reflector code.
Other good candidates:
data.sparkno: Returns value of the "sparkno" parameter. (int)
data.guard.sparkno: Returns value of the "guard.sparkno" parameter. (int)
I also think a lot of the float parameters added in 1.0 are kinda not needed, too, such as movement.down.bounce.offset.x and movement.down.bounce.offset.y. Of course common1 would need to be modified to get rid of a lot of these.
I'd also like to remind y'all that helpers can also get their own set of constants. Of particular interest are the following:
pos = off_x, off_y (int)
Specifies the x and y offsets to create this helper at. The precise meaning of these parameters is dependent on the postype. Defaults to 0,0.
These parameters have the same meaning as the corresponding parameters in the root's CNS file. You can specify one or more of these parameters to change it to a value suitable for this helper. Otherwise, they default to the values inherited from the parent.
pos is the only one that requires special processing, as it would need to be calculated at time = 0 and stored in its own variable, not making it too particularly useful. However, the head.pos and mid.pos values can be used just as well for the same purposes. Of course with helpers we won't need to standardize as much since we can make them do whatever we want for the helper's purposes.
I put this code together as a first draft for that community standard helper, since I had the majority of the code already together. I haven't tested it yet but not much was really changed with the playerid scanning section.
No real ideas on what all those vars could be used for though.
Another note on this one, a helper could be spawned by this helper to do calculations or whatever and use ParentVarSet to get values to the community standard helper. The triggers would just need to be changed to allow time for it. (Really only var(1) NEEDS to be !time.)
Spoiler, click to toggle visibilty
There's about 70 total spots for throws with the basic sprites. 23 similar pics. The 5000,5001,5002 being the same image.
It'd be best if we can figure out a system to get all 3 values into 1 reading.
The head and the waist would be with the feet on the ground. So maybe just 2 values?
Maybe a knee location for 3?
I know I do math to figure out the chest location on standing but it just gives a general X, & Y for P2 with Samus. It works pretty accurate against everybody.
I'm definitely down to do the better throw locations, but I feel like this could become a standardize animation thing too.
Like for 5004, the head pos y would be 0, and the X pos would be set to the head height.
And honestly, I think there should be a Neck positioning. So many choke moves....
This is basically the new 5003 head position sprite I was talking about.
Spoiler, click to toggle visibilty
OK so here's my idea since I'm making Necro:
We use sparkno for front foot pos and guard.sparkno for right foot pos. They're both Int32's, so we should be able to split the Pos X and Pos Y into two bitwise fields, each of 16 bits.
So to calculate the positions, you'd do Pos X | (Pos Y << 16). In other words, Pos Y is multiplied by 65536.
So for a pos of -16, 1, you'd do:
(65535&-16) | (65536 * 1) = 65520 | 65536 = 131056.
And to retrieve the position for front foot, you'd do:
[State x, TargetBind]
type = TargetBind
trigger1 = AnimElem = 6
pos = ceil(((Target,Const(Data.SparkNo)&65535) | ifElse(Target,Const(Data.SparkNo)&32768,-65536,0)) * Target,Const(Size.XScale)), ceil((Target,Const(Data.SparkNo)/65536) * target,Const(Size.YScale)), Foot