So, yeah, a few years back, I had asked for a generic trigger for some of my weapons (I think it was grayswandir that provided it), and it's been hella useful for scripted weapons, but I I never needed it for anything other than weapons, and now I do. Specifically, what it does is change a combo on the screen if a specific LWeapon comes in contact with it, but I was trying to make a second level Whistle, that would be able to trigger secrets that the normal built-in whistle can't I kinda understand how it works, but I'm not sure what to change so that it can trigger by standing on the ffc and using it rather than hitting the ffc with a weapon:
ffc script Trigger { void run(int fromCombo, int toCombo, int itemNo) { int loc = ComboAt(this->X + 8, this->Y + 8); int underCombo = Screen->ComboD[loc]; // Wait until while (// We're hit by the right item type, or !CollisionAllLWeapon(this, LWEAPON_MISC_SOURCE, itemNo) && // The combo on layer 0 changes. Screen->ComboD[loc] == underCombo) { Waitframe();} // Cancel out if the underlying combo changed. if (Screen->ComboD[loc] != underCombo) { return;} // Otherwise, we were hit by the item, so change the combos on screen. for (int i = 0; i < 176; i++) { if (Screen->ComboD[i] == fromCombo) { Screen->ComboD[i] = toCombo;}}}}
Any advice on how to change it would be much appreciated, cuz I'm pretty certain it CAN be used, just not quite sure how to do it.
EDIT: Actually, what would *really* be nice would be if it could have an extra 2 arguments, so that I can use just the one script, making it a pretty much perfect generic trigger for all purposes, one to determine if you need to strike the trigger (what it already does) or if you need to stand on it, and one for any items you have to have in your inventory in order to use it. I've pretty much abandoned the idea of making a custom whistle, but since the songs were such a big part of OoT, I could make them into passive equipment items that open up the path to the dungeon (like making the Hookshot targets at the forest temple appear) when you activate the FFC trigger, plus it would solve a problem I've been having with how to make Zelda into more than a skippable exposition dump.
Edited by Binx, 23 April 2017 - 02:41 PM.