As an aside, a feature we need to bug the devs about is being able to set Screen->D[] in ZQuest. That way, this script would be trivial and generic and stuff:
Code:
//Places tiles down when item is used.
const int bridge_flag = 98; //change this to the indicative flag
item script bridgeextender {
void run() {
int i;
bool found;
found = false;
for(i = 0; i < 176; i++) {
if(Screen->ComboF[i] == bridge_flag) {
Screen->ComboD[i] = Screen->D[0];
Screen->ComboF[i] = 0;
found = true;
} else if (Screen->ComboI[i] == bridge_flag) {
Screen->ComboD[i] = Screen->D[0];
// I think the inherent flag will change automatically?
found = true;
}
}
if (found) Game->PlaySound(SFX_SECRET);
}
}
If you want to have this functionality, put down an FFC on the screen with this script:
Code:
//sets Screen->D[whatever] to something
ffc script setScreenD {
void run(int d, int v) {
Screen->D[d] = v;
}
}
Set D0 to 0, and D1 to the bridge combo. Then, place it on the bridge screen, and use my item script as above, and you can have any bridge combo you want on any screen.
Edit: I've added these script to my website.