PDA

View Full Version : With Arrays....



Joe123
03-23-2008, 06:33 AM
With the arrays which are supposed to be in the next build (damn it's been ages since we last had a build =( I want arrays!) anyway, with arrays, would it be possible to make this script:

ffc script enemytallgrassshallowwater{
void run(int enum, int grass, int gcmb, int ripple, int rcmb){
int i; int fdly;
Waitframes(4);
npc e = Screen->LoadNPC(enum);
if(grass == 0) grass = grasstile;
if(ripple == 0) ripple = rippletile;
if(gcmb == 0) gcmb = 131;
if(rcmb == 0) rcmb = 11;
while(e->isValid()){
if(Screen->ComboT[ComboAt(e->X+8,e->Y+8)] == rcmb){
fdly++;
if(fdly == 20){i++; fdly = 0;}
Screen->DrawTile(3, e->X, e->Y-2, ripple+i, 1, 1, 4, 1, 0, 0, 0, 0, true, 128);
if(i==3) i = 0;
}
if(Screen->ComboT[ComboAt(e->X+8,e->Y+8)] == gcmb){
fdly++;
if(fdly == 20){i++; fdly = 0;}
Screen->DrawTile(3, e->X, e->Y-2, grass+i, 1, 1, 3, 1, 0, 0, 0, 0, true, 128);
if(i==3) i = 0;
}
Waitframe();
}
}
}
Cover all enemies on the screen?

I was thinking it should be, cause I read up a C++ tutorial on arrays and it seems like this should be a reasonable usage for them, yes?