Jump to content

Photo

Script Edit Request


  • Please log in to reply
No replies to this topic

#1 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 14 June 2018 - 10:25 AM

I would like another version of this script. Currently it drops an item and plays a SFX when the combo under the FFC changes. Could you help me figure out how to edit this script, so that the item and SFX don't happen until the combo changes a second time?
 

// Script that will check the combo under it
// When the combo changes (be it script, slash->next, etc.)
// It will play the given sfx and give the requested item
    // d0 = Item number
    // d1 = Sound effect
ffc script ComboChangeItemSFX
{
    void run(int itm, int sfx)
    {
        // Grab the combo under the FFC initially
        int combo = Screen->ComboD[ComboAt(this->X+4, this->Y+4)];

        // While that combo is the same, wait
        while(Screen->ComboD[ComboAt(this->X+4, this->Y+4)] == combo)
            Waitframe();

        // Create the item
        item temp = Screen->CreateItem(itm);
        temp->X = this->X;
        temp->Y = this->Y;
        temp->Pickup |= (IP_TIMEOUT);
        temp->HitWidth = 16;
        temp->HitHeight = 16;

        // Play the given sound effect
        Game->PlaySound(sfx);
    }
}



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users