Jump to content

Example Enemy [2.55]

Overview
Creator: Moosh Updated: 09 Feb 2024 Tags: 2.55, Enemy Downloads: 56
Rating[?]: No rating
Download Example
(1.83 MB)
Information

Description Setup Reviews Comments

This is an enemy script I wrote with the intent of showing off certain features and techniques of ghost.zh for those interested in scripting enemies. It is rather overcommented as I tried to lay out my whole thought process while structuring a boss fight. If anything's confusing or unclear feel free to let me know, I don't always words good.

Anyways, features of the thing:

ExampleEnemyGhost.zs
The more complex version of the enemy. This covers:
  • Some basic attack selection logic
  • Some more complex movement
  • Waitframe wrapping and the vars[] array
  • Some very simple child enemy management
ExampleEnemyGhostMinimal.zs
This is a stripped down version of the enemy. It has super basic movement and two very basic attacks. Basically a minimal viable product. For newer scripters this could maybe work as a template script when making enemies.

ExampleEnemyNPCAnim.zs
This is the first one but ported to my NPCAnim.zh header. Want to use npc scripts instead of ghost? Not afraid of dubious Moosh headers? Here you go.

ExampleEnemyNPCAnimMinimal.zs
This is the stripped down version of the script for NPCAnim.zh.

Update 4/16/23: Update for the new version of NPCAnim.zh. Also rewrote the NPCAnim example to use newer features.
Update 8/11/23: Added an NPCAnim.zh version of the minimal script.