_L_
08-31-2007, 07:46 AM
...a.k.a the Glamour script.
//
// "Glamour"
// When the seemingly solid FFC is approached, it turns translucent and fades away.
// Flags:
// * Run Script on Screen Init
//
ffc script Glamour {
void run() {
// First: hide the combo underneath while scrolling in.
int combo = ComboAt(this->X, this->Y);
int under = Screen->ComboD[combo];
Screen->ComboD[combo] = this->Data;
Waitframe();
Screen->ComboD[combo] = under;
// Next: the trickery.
while (true) {
Waitframe();
this->Flags[FFCF_CHANGER] = (Abs(this->X - Link->X) < 10 && Abs(this->Y - Link->Y) < 15);
this->Flags[FFCF_TRANS] = (Abs(this->X - Link->X+8) < 20 && Abs(this->Y - Link->Y+8) < 25);
}
}
}
Tuning: Replace "10", "15", "20" and "25" with larger numbers to increase the radius of the effect.
Ideas for usage:
* Attach to an FFC that has the appearance of a solid block. When Link walks right next to the block, it turns translucent, then vanishes.
* Attach to an FFC that has the appearance of a floor tile, and place it over a spiked combo. Link won't be able to see the spikes until he walks just next to them.
//
// "Glamour"
// When the seemingly solid FFC is approached, it turns translucent and fades away.
// Flags:
// * Run Script on Screen Init
//
ffc script Glamour {
void run() {
// First: hide the combo underneath while scrolling in.
int combo = ComboAt(this->X, this->Y);
int under = Screen->ComboD[combo];
Screen->ComboD[combo] = this->Data;
Waitframe();
Screen->ComboD[combo] = under;
// Next: the trickery.
while (true) {
Waitframe();
this->Flags[FFCF_CHANGER] = (Abs(this->X - Link->X) < 10 && Abs(this->Y - Link->Y) < 15);
this->Flags[FFCF_TRANS] = (Abs(this->X - Link->X+8) < 20 && Abs(this->Y - Link->Y+8) < 25);
}
}
}
Tuning: Replace "10", "15", "20" and "25" with larger numbers to increase the radius of the effect.
Ideas for usage:
* Attach to an FFC that has the appearance of a solid block. When Link walks right next to the block, it turns translucent, then vanishes.
* Attach to an FFC that has the appearance of a floor tile, and place it over a spiked combo. Link won't be able to see the spikes until he walks just next to them.