Jump to content

Photo

Step > Next Combo SFX


  • Please log in to reply
23 replies to this topic

#1 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 08 February 2012 - 03:30 AM

Basically I want a SFX to play when Link steps on the Step > Next combo.

I have a wonderful script that plays a SFX when the combo directly under the FFC
changes, but that script prevents the Step > Next combo from changing into
the next combo.

#2 Moosh

Moosh

    Friendly neighborhood abomination

  • Members
  • Real Name:Moosh
  • Gender:Male
  • Location:Canada Jr.
  • Past Nicks:Pokemonmaster64

Posted 08 February 2012 - 09:01 AM

It's dangerous to go alone. Take script!

Put the combo you want to play the sound between the step->next combo and the combo you want it to switch to.

#3 LinktheMaster

LinktheMaster

  • Site Staff
  • Real Name:Matt
  • Gender:Male
  • Location:Kentucky

Posted 08 February 2012 - 10:10 AM

Here's an alternative script if you only need one per screen (well, you could also put more than one of these FFC scripts on the screen if you need more, but that would be annoying if you have a bunch). Also, Poke's version will incrememnt the combo id by one after the step -> next combo goes into effect. Not that that's a problem, or anything. It's just an FYI. icon_razz.gif

Here's an alternative version. Just place the FFC script over the combo you want it to check, then it'll play the sfx in d0.

CODE

// FFC script that will play a sound effect when the combo under it changes
// d0 = The sound effect to play
ffc script sfxOnComboChange
{
    void run(int sfx)
    {
        int comboLoc = ComboAt(this->X+8, this->Y+8);
        int comboNum = Screen->ComboD[comboLoc];

        while(Screen-ComboD[comboLoc] == comboNum)
            Waitframe();

        Game->PlaySound(sfx);
    }
}


Note that I'm not at a computer that has ZQuest, so I can't test it, but I'm pretty certain it'll work.

#4 blue_knight

blue_knight

    Adept

  • Members
  • Gender:Male

Posted 08 February 2012 - 01:48 PM

QUOTE(LinktheMaster @ Feb 8 2012, 08:10 AM) View Post

Here's an alternative script if you only need one per screen (well, you could also put more than one of these FFC scripts on the screen if you need more, but that would be annoying if you have a bunch). Also, Poke's version will incrememnt the combo id by one after the step -> next combo goes into effect. Not that that's a problem, or anything. It's just an FYI. icon_razz.gif

Here's an alternative version. Just place the FFC script over the combo you want it to check, then it'll play the sfx in d0.

CODE

// FFC script that will play a sound effect when the combo under it changes
// d0 = The sound effect to play
ffc script sfxOnComboChange
{
    void run(int sfx)
    {
        int comboLoc = ComboAt(this->X+8, this->Y+8);
        int comboNum = Screen->ComboD[comboLoc];

        while(Screen-ComboD[comboLoc] == comboNum)
            Waitframe();

        Game->PlaySound(sfx);
    }
}


Note that I'm not at a computer that has ZQuest, so I can't test it, but I'm pretty certain it'll work.

Tiny correction, for those likely to copy and paste:
CODE

// FFC script that will play a sound effect when the combo under it changes
// d0 = The sound effect to play
ffc script sfxOnComboChange
{
    void run(int sfx)
    {
        int comboLoc = ComboAt(this->X+8, this->Y+8);
        int comboNum = Screen->ComboD[comboLoc];

        while(Screen->ComboD[comboLoc] == comboNum)
            Waitframe();

        Game->PlaySound(sfx);
    }
}


#5 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 08 February 2012 - 05:32 PM

QUOTE(blue_knight @ Feb 8 2012, 11:48 AM) View Post

Tiny correction, for those likely to copy and paste:
CODE

// FFC script that will play a sound effect when the combo under it changes
// d0 = The sound effect to play
ffc script sfxOnComboChange
{
    void run(int sfx)
    {
        int comboLoc = ComboAt(this->X+8, this->Y+8);
        int comboNum = Screen->ComboD[comboLoc];

        while(Screen->ComboD[comboLoc] == comboNum)
            Waitframe();

        Game->PlaySound(sfx);
    }
}



This has the same problem. The FFC above the step > next combo prevents the
step > next combo from changing to the next combo.

Now to test Pokemonmaster64's script.

EDIT: Pokemonmaster64's script worked. Thanks icon_smile.gif

Edited by Cukeman, 08 February 2012 - 05:48 PM.


#6 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 21 February 2012 - 08:01 AM

I need such a script for "step->secrets (permanent)"-combos.
Can anybody help me please? icon_smile.gif

#7 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 21 February 2012 - 02:13 PM

QUOTE(Lord Settra! @ Feb 21 2012, 06:01 AM) View Post

I need such a script for "step->secrets (permanent)"-combos.
Can anybody help me please? icon_smile.gif


I have a script that will do what you need:

Pokemonmaster64's ffc script soundcombo


To use this script, make a combo for your "step->secrets (permanent)"-combo (#1).
A combo for it to change to (#2) (and then duplicate #2 in the combo slot immediately following #2 to make #3).
D0 = combo (#2) in my example
D1 = SFX

Put a secret flag on your "step->secrets (permanent)"-combo (#1).
And set that secret flag to combo (#2) in my example.

This will work anytime combo (#2) is present on the screen, so one FFC can
be used for multiple secrets, and you don't need to place the FFC anywhere in particular.

Edited by Cukeman, 26 February 2012 - 07:49 PM.


#8 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 22 February 2012 - 11:27 AM

Your second script sounds good, thx. ^^

Edit:
The only thing, the second script does, is to don't activate the secret. XD
I will try the first one.

Edit2:
The first one works, thank you. icon_biggrin.gif

Edited by Lord Settra!, 22 February 2012 - 12:24 PM.


#9 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 22 February 2012 - 08:07 PM

Well the second script doesn't need to activate the secret.
That part is taken care of in the combo and flags used.

But the choice is yours.

Edited by Cukeman, 26 February 2012 - 07:49 PM.


#10 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 26 February 2012 - 01:12 PM

OK, but the problem is that the "step->secret"-combo works like a "(none)"-combo, when I use the second script. But I don't care about this, because the first one works. icon_biggrin.gif

#11 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 26 February 2012 - 07:46 PM

not if you set it up with inherent flags like a tiered secret

EDIT:

I'm sorry, Lord Settra! you are correct. My thinker must be tired.

The very reason I requested the script you are using was because step next combos
don't change to the next combo when the other ffc script is above them icon_redface.gif

Edited by Cukeman, 26 February 2012 - 07:51 PM.


#12 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 28 February 2012 - 07:45 AM

No problem and thx again for your help. icon_smile.gif

#13 Jared

Jared

    The hero rises again.

  • Members
  • Real Name:Link
  • Gender:Male
  • Location:Massachusetts
  • Past Nicks:Lynker

Posted 04 July 2012 - 08:08 PM

I hate to "revive" this again, but how come the sound is playing again when I go back onto the screen?

#14 Cukeman

Cukeman

  • Member
  • Gender:Unspecified

Posted 04 July 2012 - 09:08 PM

QUOTE(Jared @ Jul 4 2012, 07:08 PM) View Post

I hate to "revive" this again, but how come the sound is playing again when I go back onto the screen?


How are you using this?

#15 Jared

Jared

    The hero rises again.

  • Members
  • Real Name:Link
  • Gender:Male
  • Location:Massachusetts
  • Past Nicks:Lynker

Posted 04 July 2012 - 09:20 PM

I have 2 "stepped" combos in my combo thing, but it's not doing anything.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users