Jump to content

NPCAnim.zh

Overview
Creator: Moosh Updated: 09 Feb 2024 Tags: 2.55, Library Downloads: 67
Rating[?]: Rating: 4.33/5 (2 ratings)
Download Script
(15.39 KB)
Information

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.
  • PlayDeathAnim() makes the enemy do a boss explode death animation.
  • SetAnimMovementHitbox() lets the enemy use a different hitbox for movement and damage collisions.
Update 4/16/23 - 1.2.0: Rewrote a large portion of the header to use new ZScript classes instead of the janky older array method. This will break backwards compatibility with older versions of scripts, but they should be very easy to update.
  • 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/9/23 - 1.2.1: A couple bugfixes with ExtendAnim()
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 11/30/23 - 1.3.1: Small bugfix to animation groups when turning with extended sprites.
Update 2/9/24 - 1.3.2: Small bugfix to large sprite animations wrapping around the tile page.