NPCAnim.zh
Overview
Creator:
Moosh
Updated: 22 May 2026
Tags:
2.55,
Library
Downloads: 149
|
Download Script (37.18 KB) |
Information
This is a header for handling enemy animations and movement for NPC scripts.
Description Setup Reviews Comments
This is a header for handling enemy animations and movement for NPC scripts.
Update 9/10/22 - 1.1.0: Added two new functions.
Update 11/29/23 - 1.3.0: Another expansion to hopefully make it easier to make multi directional enemies with complex animations.
Update 2/9/24 - 1.3.2: Small bugfix to large sprite animations wrapping around the tile page.
Update 7/16/24 - 1.3.3: Small improvement to handling for animation multipliers.
Update 8/15/24 - 1.3.4: Fixed compatibility with ZC 3.0.
Update 8/28/24 - 1.3.5: Added SetFlag() to the AnimHandler for telling very basic enemies how to respond to stunning, knockback, and falling in pits.
Update 12/25/24 - 1.3.6: Added some warning messages for common enemy editor mistakes.
Update 3/29/26 - 1.4.0: This update is focused on ease of use, the big thing being defining animations from combos which was a frequently requested feature from people used to ghost.
Update 4/19/26 - 1.4.1.1: Fourth decimal place moment. This adds nothing new but fixes some warnings in 3.0.
Update 5/22/26 - 1.4.2.0: Split files for 2.55 and 3.0, added ADF_VERTICALTILES for vertical animations.
Update 9/10/22 - 1.1.0: Added two new functions.
- PlayDeathAnim() makes the enemy do a boss explode death animation.
- SetAnimMovementHitbox() lets the enemy use a different hitbox for movement and damage collisions.
- New flag: ADF_VERTICAL, which will allow 4-way and 8-way animations to have their directions arranged vertically.
- New function: ExtendAnim() which can be called after AddAnim() to give individual animations different sizes and hitbox offsets.
- DEBUG_COLLISION_HITBOX config, allowing visual debugging collision hitboxes with the environment.
- A few small quality of life functions.
Update 11/29/23 - 1.3.0: Another expansion to hopefully make it easier to make multi directional enemies with complex animations.
- New function: AddAnimGroup() which is called to assign a group of directional animations to one slot as a single group.
- New function: SetMovementTracking() which adds an extra functionality to the AnimHandler which tracks changes in Link's position for writing predictive attacks.
Update 2/9/24 - 1.3.2: Small bugfix to large sprite animations wrapping around the tile page.
Update 7/16/24 - 1.3.3: Small improvement to handling for animation multipliers.
Update 8/15/24 - 1.3.4: Fixed compatibility with ZC 3.0.
Update 8/28/24 - 1.3.5: Added SetFlag() to the AnimHandler for telling very basic enemies how to respond to stunning, knockback, and falling in pits.
Update 12/25/24 - 1.3.6: Added some warning messages for common enemy editor mistakes.
Update 3/29/26 - 1.4.0: This update is focused on ease of use, the big thing being defining animations from combos which was a frequently requested feature from people used to ghost.
- AddAnimCombo() allows adding animations based on combo data, similar to ghost.zh. These can be synced with the combo animation like ghost or independent depending on the ADF_COMBOSYNC flag.
- ADF_2WAYLR, ADF_2WAYUD, and ADF_4WAYDIAG flags for directional animations.
- ADF_FLIPRIGHT is now four flags allowing flipping tiles in any of the four cardinal directions
- ADF_CONSTHFLIP and ADF_CONSTVFLIP flags for simple flipping animations.
- A bunch of handy functions in the NPCAnim::Utility namespace which should speed up the enemy scripting process a bit.
- The old custom movement functions have been mostly obsoleted and moved to the NPCAnim::CustomMovement namespace. For most cases you'll want to use the new EngineMove* functions in NPCAnim::Utility which call their engine equivalents but make use of NPCAnim's custom movement hitboxes.
- If you like to use classes for your enemies, you can now store a class pointer in the AnimHandler object so you can access it in any of your enemy's functions with GetEnemyClassPointer(). There wasn't too much stopping you from doing this before, but this potentially saves you a Misc[] index.
Update 4/19/26 - 1.4.1.1: Fourth decimal place moment. This adds nothing new but fixes some warnings in 3.0.
Update 5/22/26 - 1.4.2.0: Split files for 2.55 and 3.0, added ADF_VERTICALTILES for vertical animations.


