omf2097 / openomf

One Must Fall 2097 Remake
http://www.openomf.org
MIT License
362 stars 35 forks source link

CX/CY tags #331

Open katajakasa opened 7 years ago

katajakasa commented 7 years ago

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:

Notes:

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