Bridge Extender
This script was requested by a user on the AGN forums, and it's posted here for use by all. It allows one to have a simple "bridge" appear out of nowhere, using a custom item. As it works outside of the regular Secrets system, it can be combined with other secrets!
Script
import "std.zh"
//Places tiles down when item is used.
const int bridge_flag = 98; //change this to use a different flag
const int screend = 0; //if you use Screen->D[0] for something else, change this
item script bridgeextender {
void run() {
int i;
bool found;
found = false;
if(Screen->D[screend] != 0) {
for(i = 0; i < 176; i++) {
if(Screen->ComboF[i] == bridge_flag) {
Screen->ComboD[i] = Screen->D[screend];
Screen->ComboF[i] = 0;
found = true;
} else if (Screen->ComboI[i] == bridge_flag) {
Screen->ComboD[i] = Screen->D[screend];
// I think the inherent flag will change automatically?
found = true;
}
}
}
if (found) Game->PlaySound(SFX_SECRET);
}
}
Arguments
None
Notes
- You must use the Set Screen->D[] script in order to use this script. Unless you change the "screend" constant, then you want to set Screen->D[0] to the combo of the bridge tile you want.
Screen shots
Coming soon!