Okay, so the next thing I want to do is modify this script:
//D0: Item ID to give //D1: Combo to check for //D2: SFX upon receiving the item (leave at 0 to turn off) //D3: Give the Item if Link's in the air? (leave at 0 for yes, 1 or higher otherwise) //D4: SFX upon losing the item (leave at 0 to turn off) ffc script ComboTileModifier { void run(int itemid, int comboid, int SFXON, int inair, int SFXOFF) { while (true) { if (ComboD[ComboAt(Link->X + 8, Link->Y + 8)] == comboid && (inair < 1 || Link->Z <= 0)) //If on the combo { if (Link->Item[itemid] == false) //Check to see if he doesn't have the item currently. Prevents lag from giving an item every second. { if (SFXON > 0) Game->PlaySound(SFXON); //Play sound if applicable. Link->Item[itemid] = true; //Give him the item. } Link->InputA = false; Link->InputB = false; } else //If not on the combo { if (Link->Item[itemid] == true) //Check to see if he has the item currently. Prevents lag from losing an item every second. { if (SFXOFF > 0) Game->PlaySound(SFXOFF); //Play sound if applicable Link->Item[itemid] = false; //Lose the item. } } Waitframe(); } } }
I like how it gives and takes the item, but if Link has Shield 1, I want to change the item to "B" instead, Shield 2=Item "C", and Shield 3=Item "D".
Which would be something like this I guess:
if (Link->Item[37] == true)//Shield 3 { CHANGE ITEM IN D0 to Item[157]; } else if (Link->Item[8] == true)//Shield 2 { CHANGE ITEM IN D0 to Item[156]; } else if (Link->Item[93] == true)//Shield 1 { CHANGE ITEM IN D0 to Item[155]; } else Link->Item[itemid] = true; //Give him the item.
I know that's not valid script, but if you could help me clean that up and determine where exactly it goes in the script that would be awesome. Sorry for my lack of knowledge D:
Edited by Cukeman, 22 April 2016 - 02:50 AM.