[2.55] Enemy Sword
Overview
Creator:
Moosh
Updated: 06 Jul 2026
Tags:
2.55,
Enemy
Downloads: 3
|
View Script
Download Package (7.26 KB) |
Information
This is a simple script that gives an enemy a sword in front of it. There's also an extra more complex script that gives it more Gameboy Darknut like behavior.
Description Setup Reviews Comments
EnemySword_Simple
Set the enemy to use this script in the editor. Set its arguments like so:
Set up the following constants for all enemies using this script:
Set the enemy to use this script in the editor. Set its arguments like so:
- InitD[0]: The sprite (Quest->Grapics->Sprites->Sprite Data) to use for the swords. This sprite a set of four tiles: Up, Down, Left, Right
- InitD[1]: How far outwards to extend out the sword
- InitD[2]: On up and down sprites, how much to shift the sword to the side
- InitD[3]: On left and right sprites, how much to shift the sword downward
Set up the following constants for all enemies using this script:
- SFX_SWORDCLASH: The sound that plays when a sword clash happens
- SPR_SWORDCLASH: The sprite that draws between the swords when a sword clash happens
- SWORDCLASH_PUSH_SPEED: How fast Link and the enemy are pushed during a clash
- SWORDCLASH_PUSH_TIME: How long the clash pushes for
- SWORDCLASH_STUN_TIME: How long the enemy stays in place for after a clash.
- InitD[0]: The sprite (Quest->Grapics->Sprites->Sprite Data) to use for the swords. This sprite a set of four tiles: Up, Down, Left, Right
- InitD[1]: How far outwards to extend out the sword
- InitD[2]: On up and down sprites, how much to shift the sword to the side
- InitD[3]: On left and right sprites, how much to shift the sword downward
- InitD[4]: How many pixels the enemy's aggro range is. When Link steps into this range it will attack.
- InitD[5]: How may frames it chases Link for
- InitD[6]: How many frames it cools down for before it can chase Link again


