Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Bigger Enemies

21 replies · 5,683 views · Started 23 June 2008

I read somewhere that it's possible to make enemies bigger without the use of scripts. If I did read this right, how do you do this?

I'm pretty sure you have to use scripts.
It wouldn't be a very complicated script to just make, say, a 2x1 enemy or something though.

No real specs, I'd just need something I can throw number into to make bigger enemies.

Would Ijust have to through in the numbers in that script there?

Sort of.
Depends how you want it to work, and how big you want the enemy to be though.
Do you want it to just take an enemy from the list (so say, take the first enemy, or take the 5th enemy or whatever), or work for all enemies of a certain type or what?

I'm going to chime in here and say I'd like to be able to do this for an assortment of enemies in the LttP tileset, so they're always the right size. Many of them need to be 1x2 or 2x2 tiles.

ffc script enemyresize{
void run(int n, int h, int w){
if(h==0) h=1;
if(w==0) w=1;
Waitframes(4);
npc e = Screen->LoadNPC(n);
e->Extend = 3;
e->TileHeight = h;
e->TileWidth = w;
e->HitHeight = h*16;
e->HitWidth = w*16;
}
}

[list=0][*]D0: Number of enemy on list to load
[*]D1: Height of new enemy
[*]D2: Width of new enemy[/list]

Should be pretty universal.

Oh yeah, it doesn't work for all animation types.
It gets pretty funky if you try it with Tektites.
It's good for 4-frame 4-dir types though.
Dunno about anything else, I haven't tried it.

One thing you really gotta be aware of is that enemies resized have to be drawn the right way. So if you're resizing an enemy you already have and don't want to have to sacrifice it's "small size" tiles to make it large, you should set it to a new tile. Here is a revision.

ffc script enemyresize{
void run(int n, int h, int w, int t){
if(h==0) h=1;
if(w==0) w=1;
Waitframes(4);
npc e = Screen->LoadNPC(n);
e->Tile = t;
e->Extend = 3;
e->TileHeight = h;
e->TileWidth = w;
e->HitHeight = h*16;
e->HitWidth = w*16;
}
}

D3: Tile of new enemy.

Ah, I assumed it was for a completely new enemy, only handled by the script.
Good idea though, but maybe something like this?

ffc script enemyresize{
void run(int n, int h, int w, int t){
if(h==0) h=1;
if(w==0) w=1;
Waitframes(4);
npc e = Screen->LoadNPC(n);
if(t!=0) e->Tile = t;
e->Extend = 3;
e->TileHeight = h;
e->TileWidth = w;
e->HitHeight = h*16;
e->HitWidth = w*16;
}
}

I like your signature by the way =P
Made me laugh =P

It would be cool to further augment the script somehow to keep enemies from walking through walls. I don't think it would be too hard but I'm not going to do it right this second.

I increased the hitbox to be the same size as the tilesize, won't that increase the size of the enemy?

If the solidity does remain at 1x1, that's ok for say, a 2x1 aLttP Knight or something though still.

that increases their interaction with weapons. However, their hitbox can still go through walls.

I've not yet actually tried messing with this yet, but lemme see if I can boil down what you're saying:

The entire system was very, very poorly programmed, mirite?

Not at all. It works very well if you do a little extra scripting to control the movement. It was left unfinished to avoid delaying the release much further than it is already delayed.

Revfan9 wrote:I've not yet actually tried messing with this yet, but lemme see if I can boil down what you're saying:

The entire system was very, very poorly programmed, mirite?

As an accurate approximation of the behavior of Zelda 1 enemies, it as very well programmed.

As a flexible easily modified system, it's far from.

Thanks for the help everyone! 😃 I'll give it a shot ASAP. I appreciate it! 😃 (I realize I'm a little late, sorry 'bout that.)