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

BigEnemy script help

1 replies · 1,489 views · Started 19 February 2011

I was looking for a way to make enemies bigger (making an octorock 2x2 instead of 1x1) and was given this script.

For some reason when I import it and go to compile it gives me a syntax error on line 14, expecting assign or semicolon on token {

I'm pretty new to scripting, so it's complete gibberish to me lol. I just copy/paste them into my games. Any help is greatly appreciated. 😃

Here's the script:

[PHP]global script BigEnemies
{
void run()
{
while(true)
{
ExtendEnemies();
Waitframe();
}
}

void ExtendEnemies
{
npc enemy;

for(int i=Screen->NumNPCs(); i>0; i--)
{
enemy=Screen->LoadNPC(i);

if(enemy->Extend==0 && enemy->Attributes[10]!=0)
{
if(enemy->Attributes[10]==1)
enemy->Extend=1;
else if(enemy->Attributes[10]==2)
enemy->Extend=2;
}
}
}
}[/PHP]