Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffc script hitAllTriggers
- {
- void run()
- {
- int trigger_pos[528]; //176 types, 176 flags 176 inh flags
- int count = 0; //if count is < 0, then we hit all triggers
- int types[]={-1}; //List al/l types here.
- int flags[]={-1}; //list all placed flags here
- int iflags[]={-1}; //list all placed inh. flas here
- int q = 0; int w = 0; //main loop, secondary loop
- //set-up and store all appropriate types and flags
- for ( q = 0; q < 176; +q )
- {
- //q is always position
- for ( w = SizeOfArray(types)-1; w >= 0; --w )
- {
- if ( Screen->ComboT[q] == types[w] )
- {
- trigger_pos[q] = Screen->ComboT[q];
- ++count;
- }
- }
- for ( w = SizeOfArray(flags)-1; w >= 0; --w )
- {
- if ( Screen->ComboF[q] == flags[w] )
- {
- trigger_pos[q+176] = Screen->ComboF[q];
- ++count;
- }
- }
- for ( w = SizeOfArray(iflags)-1; w >= 0; --w )
- {
- if ( Screen->ComboI[q] == iflags[w] )
- {
- trigger_pos[q+352] = Screen->ComboF[q];
- ++count;
- }
- }
- }
- //loop, checking if all triggers have changed
- while(1)
- {
- for ( q = 0; q < 176; ++q )
- {
- if ( trigger_pos[q] )
- {
- if ( Screen->ComboT[q] == trigger_pos[q] ) continue;
- else
- {
- trigger_pos[q] = 0;
- --count;
- }
- }
- if ( trigger_pos[q+176] )
- {
- if ( Screen->ComboF[q+176] == trigger_pos[q] ) continue;
- else
- {
- trigger_pos[q+176] = 0;
- --count;
- }
- }
- if ( trigger_pos[q+352] )
- {
- if ( Screen->ComboF[q+352] == trigger_pos[q] ) continue;
- else
- {
- trigger_pos[q+352] = 0;
- --count;
- }
- }
- }
- if ( count <= 0 ) break;
- Waitframe();
- }
- //EXECUTE whqatever you want to happen when all triggers are cxleared, here.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement