Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CX/CY tags #331

Open
katajakasa opened this issue Jul 22, 2017 · 0 comments
Open

CX/CY tags #331

katajakasa opened this issue Jul 22, 2017 · 0 comments

Comments

@katajakasa
Copy link
Member

katajakasa commented Jul 22, 2017

These set the current movement speed to the Hars current facing direction. CX works on horizontal axis, while CY works on vertical axis. CY tag only works if CX is also set. Values seem to be in pixels per frame. Speed is only set if object was already moving (additional speed calculation). If only one of the tags is set, then the other tag value is assumed to be 0.

Some animation types cause certain exceptions to the calculations. If animation is not exception case, then these special variables will be considered to be 0. Exceptions & values:

Key cxe cye
BURNING_OIL -1.0 0
CROUCHING_BLOCK -0.7 0.7
BLOCKING_SCRAPE -0.7 -0.7
STANDING_BLOCK 0 1.0
JUMPING 0 -1.0
STUNNED 1.0 0
CROUCHING 0.7 0.7
STANDING_UP 0.7 -0.7

Calculations:

  • horizontal_speed = horizontal_speed + float(cx) * cxe * horizontal_agility_modifier
  • vertical_speed = vertical_speed + float(cy) * cye * vertical_agility_modifier
  • Note that cx and cy must be converted to float by dividing with 256.

Notes:

  • If CX or CY tag is set, any existing X and Y slides are set to 0.
  • CX speed is multiplied by -1, if animation is facing left.

Additional agility modifiers explained here: #395 -- 0.03 modifier is used for horizontal speed, while 0.02 modifier is used for vertical speed.

@katajakasa katajakasa added this to the 0.7 Gameplay milestone Jul 22, 2017
@katajakasa katajakasa added this to Todo in Tags Aug 2, 2017
katajakasa added a commit that referenced this issue Aug 8, 2017
@katajakasa katajakasa moved this from Todo to Manual testing needed in Tags Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Tags
Manual testing needed
Development

No branches or pull requests

1 participant