Jump to content

Photo

Enemy Changing Combos


  • Please log in to reply
19 replies to this topic

#16 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 20 January 2012 - 11:25 PM

QUOTE(Saffith @ Jan 20 2012, 07:28 PM) View Post

D'oh. Let me try that again...
CODE
ffc script ComboAdvancer
{
    void run()
    {
        int numNPCs=Screen->NumNPCs();
        while(true)
        {
            while(numNPCs>Screen->NumNPCs())
            {
                Screen->ComboD[ComboAt(this->X, this->Y)]++;
                numNPCs--;
            }
            numNPCs=Screen->NumNPCs();
            Waitframe();
        }
    }
}




This script worked for me icon_smile.gif Thanks a bundle!

#17 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 20 January 2012 - 11:32 PM

How did you set the combos to variables without using do's ? When i tried it all it did was count down. With mine all you need to do is set the statements.

Edited by tox_von, 20 January 2012 - 11:33 PM.


#18 blue_knight

blue_knight

    Adept

  • Members

Posted 20 January 2012 - 11:37 PM

QUOTE(tox_von @ Jan 20 2012, 08:32 PM) View Post

How did you set the combos to variables without using do's ?

What do you mean do's? Basically the Screen->ComboD[]++ increments the value stored in ComboD[]. So if it starts as 10, for example, it'll become 11 when the first enemy is killed, 12 for the next and so on. You could compute ComboAt(this->X, this->Y) outside the loop, if the FFC doesn't move, but that's just me being picky about saving a few instructions. icon_razz.gif

#19 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 21 January 2012 - 12:02 AM

yeah i get it now you just need to set the variable at the start and make new combos.

#20 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 26 January 2012 - 07:36 PM

QUOTE
CODE
ffc script ComboAdvancer
{
    void run()
    {
        int numNPCs=Screen->NumNPCs();
        while(true)
        {
            while(numNPCs>Screen->NumNPCs())
            {
                Screen->ComboD[ComboAt(this->X, this->Y)]++;
                numNPCs--;
            }
            numNPCs=Screen->NumNPCs();
            Waitframe();
        }
    }
}


This script works great, could someone please edit it so that it will advance the combo each time I collect
the item specified in D0? (I will be collecting several of the same item on the screen where the FFC script is located)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users