Jump to content

Photo

Flashing Link and screen


  • Please log in to reply
5 replies to this topic

#1 Purplemandown

Purplemandown

    The Old Guard

  • Members
  • Real Name:Nathan
  • Location:Milwaukee, WI

Posted 10 January 2010 - 07:56 PM

Ok, so I scripted the ZII spells, and I need a piece of a script that will make Link flash for a second or so, and another that will flash the screen (But NOT Link) for the same duration. (Two seperate script pieces)

If I get them, I'll just work them into the scripts I have. Oh, and it's build 1112.

#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 10 January 2010 - 08:17 PM

CODE
void FlashLayer( int layer, int combo, int cset, int counter )
{
    if(counter%2==0)
    {
        for(int i; i<176;i++)
            Screen->FastCombo(layer,ComboX(i),ComboY(i),combo,cset,64);
    }
}


Or faster solid color version:

CODE
void FlashLayer( int layer, int cset, int counter )
{
    if(counter%2==0)
    {
            Screen->Rect(layer,0,0,256,176,cset,0,0,0,true,64);
    }
}


edit-
CODE
void FlashLayer( int layer, int cset, int counter,int flash_spacing )
{
    if(counter% flash_spacing==0)
    {
            Screen->Rect(layer,0,0,256,176,cset,0,0,0,true,64);
    }
}

This should flash the screen (untesed).

Edited by Gleeok, 10 January 2010 - 08:22 PM.


#3 Purplemandown

Purplemandown

    The Old Guard

  • Members
  • Real Name:Nathan
  • Location:Milwaukee, WI

Posted 10 January 2010 - 08:20 PM

Awesome. But... Is one tick of the counter 1 frame? How long is one counter tick?

#4 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 10 January 2010 - 08:24 PM

Just call by:

CODE

int some_counter;
...
FlashLayer( 6, cset, some_counter++, 2 );


Edited by Gleeok, 10 January 2010 - 08:26 PM.


#5 Purplemandown

Purplemandown

    The Old Guard

  • Members
  • Real Name:Nathan
  • Location:Milwaukee, WI

Posted 10 January 2010 - 08:33 PM

OK, thanks. (But I still need to know how to work the timer. How long is one tick of the counter?)

#6 Joe123

Joe123

    Retired

  • Members

Posted 11 January 2010 - 04:19 AM

CODE
int counter = 0;
while(screenflashing){
     FlashLayer( 6, cset, counter, 2 );
     counter++;
Waitframe();
}



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users