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

need someone to test a script for me.

5 replies · 1,819 views · Started 04 April 2008

ok here's the deal.

ive made a script right?

well i need someone to test it for me.

not meaning im being lazy. ive tried to test it myself.

see here's what happens.

i set the screen to black out. so i get to the screen and the lights blacken.
after that the game freezes EVERYTHING except the music.

so im thinking it might be a corrupted file possibly.

if i posted the script, could one of you test it for me to see if the file is corrupted?

(also yeah i know its not a great custom boss... yet. i still have to beef it up XD)

meanwhile, if it isnt a file corruption, ill look at it very closely to see what i did wrong.

i think it has to do with my while loop. but im not sure.

here's the script:

//ennefenom's ghoma script

//ok so im going ot explain how to set up the script part only.
//im also going to leave notes so hopefully you can do something like this yourself at some point.
//also im going to assume you know nothing about scripting so ill explain every little detail

//first your setup. you will need:

//1 set of combos for the body, and 2 to 3 sets for the eye. the eye will have 2 different colors, which will be cycled back and forth.
//2 ffc's. one that is only the eye, and one that is everything but the eye
//1 custom enemy. you can make its attributes. (shooter, etc.)
//1 sound effect for a "dying ghoma"

//now for your arguments

//D:0=the ID of the enemy that will be used as ghoma's HP. do not set combos for this enemy, as it is supposed to be invisible.
//D:1=the ID of the enemy you want to spawn when it is "invincible"
//D:2=the ID of the combo you want the eye to be when it is vulnerable.
//D:3=the ID of the combo you want to use when ghoma is invulnerable
//D:4=how much health you want ghoma to start with
//D:5=the # of the sound you want to use for "ghoma dying"

import "std.zh" //this imports variables from a file in the build folder, which makes this script possible

ffc script ghoma{//this names your script "ghoma"and sets the type to FFC. also opens a new level of scope with "{"

void run(int m, int n, int c1, int c2,int h, int s){//starts the script to running. also notice i places a tab stroke for organization. layer 1 of scope = 1 tab press.

ffc ghoma_body;

ffc ghoma_eye;

npc ghost;

npc dummy1;

npc dummy2;

int beasts;

ghoma_body = Screen->LoadFFC(1);//notice i didnt use "{" here. there are no functions within what ive told it to do, so no need for them

ghoma_eye = Screen->LoadFFC(2);//with this line and the previous one, ive commanded the screen to draw 2 FFC's and name them ghoma eye and ghoma body

ghost = Screen->CreateNPC(m);//creates an NPC (or an enemy) whose ID is equal to the value of "m"

ghost->X=ghoma_eye->X;ghost->Y=ghoma_eye->Y;//not sure if i worded this right yet... sets the coordinates of the enemy anf the eye to the same every frame

while (true){

if(Screen->NumNPCs()==1){

dummy1= Screen->CreateNPC(n);
dummy2= Screen->CreateNPC(n);//these draw enemies with an ID equal to the value of n

beasts=1;

if(dummy1->HP<1&&dummy2->HP<1){

beasts=2;

}

ghost->HP=9999;//gives an "invincible"effect

if(beasts==2){// this is an if function. it says if (whatevers in parentheses is true) then preform the next level of scope.

ghoma_eye->Data = c1;//cycles the combo for the eye to another combo, ID equal to c1
ghost->HP=h;//turns off the enemy's invincibility

Waitframes(900);//waits 15 seconds(i think)
h=ghost->HP;

ghost->HP=9999;//turns invincibility back on

ghoma_eye->Data = c2;

}//this closes a level of scope, here being the if function
if(ghost->HP<1){//another if function

ghoma_body->Data=0;//"kills" the FFCs
ghoma_eye->Data=0;

Game->PlaySound(s);//plays a sound equal to the interger "s"
}
Waitframe();
}
}
}

}

EDIT:i just tested it on a seperate file. made it completely from scratch and even in a different tileset. its no corruption.

can someone tell me what im doing wrong?

lol no joe.

im making this script for him, and that was the first name for it that came to mind.

(also if it was me i would have spelled it right 😛)