YesNoOk
avatar

Elongating Clsn1 box Along with Scaling? (Read 772 times)

Started by Fighting Toys Freak, December 20, 2019, 10:07:57 pm
Share this topic:
Elongating Clsn1 box Along with Scaling?
#1  December 20, 2019, 10:07:57 pm
  • **
  • New changes, new me!
Hey.

While debugging, I noticed that an attack's Clsn1 hitbox does not align with its scale.

I would like to know how I can execute a state controller that would call to expand a Clsn1 hitbox for an attack. I do not understand how the Clsn1 hitbox of the attack's animation does not change in proportion to the attack's scale. The scale of the attack's animation is a result of the modification of its scaling parameter from the AngleDraw-type state controller. Here is a depiction of the issue:
Code:
...
[State 0, AngleDraw]
type = AngleDraw
trigger1 = 1
value = Atan((fvar(1)*3)/(fvar(0)*133))
scale = -facing*fvar(0), 1
ignorehitpause = 1
...



Any suggestions?
 
Last Edit: December 21, 2019, 02:07:02 am by Fighting Toys Freak
Re: Elongating Clsn1 box Along with Scaling?
#2  December 20, 2019, 10:52:53 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
clsn boxes are not scaled.
The only way to fix that is to have different sized clsn boxes in the animation, and then change to the correspoding anim/animelem based on the angledraw scale
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!
Re: Elongating Clsn1 box Along with Scaling?
#3  December 21, 2019, 02:01:05 pm
  • **
  • New changes, new me!
clsn boxes are not scaled.
The only way to fix that is to have different sized clsn boxes in the animation, and then change to the correspoding anim/animelem based on the angledraw scale

Could I align the Clsn1 hitbox of the attack's animation with a Width-type state controller? I think adjusting the scaling by the corresponding animation will be both tedious and messy, in my opinion.

Here is a line of code that I think will work:
Instead of...
Code:
...
[State 0, AngleDraw]
type = AngleDraw
trigger1 = fvar(0) != 0
value = Atan((fvar(1)*3)/(fvar(0)*133))
scale = -facing*fvar(0), 1
ignorehitpause = 1
...

I could use this:
Code:
...
[State 0, Width]
type = Width
trigger1 =1
edge = 0,0
player = 0,0
;value = -facing*fvar(0)/133,-facing*fvar(0)/133
ignorehitpause = 1
...

Or, alternatively:
Code:
...
;Would spawn a helper once per helper
[State 0, Helper]
type = Helper
trigger1 = var(3) < ceil(fvar(0)/133)
ID = 223
stateno = 223
pos = 0,0
ownpal = 1
persistent = 0

[State 0, VarSet]
type = VarSet
v = 3
value = (Parent, Var(3)) + 1
...

The variable, fvar(0), represents the length at which the attack should extend between the parent and its opponent.

Any suggestions?
Re: Elongating Clsn1 box Along with Scaling?
#4  December 21, 2019, 07:02:29 pm
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
No

clsn boxes are not scaled.
The only way to fix that is to have different sized clsn boxes in the animation, and then change to the correspoding anim/animelem based on the angledraw scale

You need different animations with different sized boxes, and then change to the correct ani based on the scaling. It's easier if your "beam" has no boxes and instead it's displayed on top of an invisible helper (the one that has the hitboxes)
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!