Jump to content

Photo

3 FFC Scripts


  • Please log in to reply
3 replies to this topic

#1 Geoffrey

Geoffrey

    Chosen One

  • Members

Posted 30 December 2009 - 03:47 PM

1. Press Start to warp.
2. Warp when strings finish.
3. Play SFX when trigger is activated.

Thanks and whoever does these shall be in the credits for WWZ. icon_biggrin.gif

#2 Joe123

Joe123

    Retired

  • Members

Posted 30 December 2009 - 04:43 PM

CODE
const int CMB_AUTOWARPA = 0; //Set combo ID of Autowarp A Combotype here
ffc script StartWarp{
    void run(int dly){
        Waitframes(dly);
        while(Link->InputStart) Waitframe();
        Link->InputStart = false;
        this->Data = CMB_AUTOWARPA;
    }
}

Set the Sidewarp A to where you want to warp after pressing start. D0 is the number of frames to wait until allowing the player to press start (before that nothing happens).

CODE
const int CMB_AUTOWARPA = 0; //Only include this once in the script file
ffc script MessageWarp{
    void run(int m){
        Waitframes(4);
        Screen->Message(m);
        Waitframe();
        this->Data = CMB_AUTOWARPA;
    }
}

Set D0 to be the message to play, and make sure you have the 'Messages Freeze All Action' rule set.

CODE
ffc script TriggerSFX{
    void run(int sfx){
        int loc = ComboAt(this->X,this->Y);
        int orig = Screen->D[loc];
        while(Screen->ComboD[loc] == orig) Waitframe();
        Game->PlaySound(sfx);
    }
}

Place the ffc on top of one of the combos that changes when the trigger is activated, and set D0 to be the sound effect to play.

#3 Geoffrey

Geoffrey

    Chosen One

  • Members

Posted 30 December 2009 - 05:29 PM

Thanks man. icon_biggrin.gif

#4 Joe123

Joe123

    Retired

  • Members

Posted 30 December 2009 - 06:10 PM

No problem.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users