Jump to content

Photo

FFC and Item script requests.


  • Please log in to reply
5 replies to this topic

#1 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 04 February 2011 - 02:56 PM

I would like to kindly ask for assistance in this little task.

1) An FFC script that plays background ambiance sfx, preferably with an option to set how many can be played and how many frames to wait before playing each one.

2) An item script that will make the sword flash when the spin attack is charged. This would most likely be attached to the spin attack scroll.

I greatly appreciate the help everyone!

P.S. Joe123, stay off this one. Don't hurt your hands for some silly little request. Your health is top priority!!! I mean it!!!

Edited by OOTFan, 04 February 2011 - 02:56 PM.


#2 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 11 May 2011 - 01:44 PM

well, after months of no response i think i should bump this. Can anyone help me with this?

#3 Saffith

Saffith

    IPv7 user

  • Members

Posted 17 May 2011 - 03:49 PM

QUOTE
1) An FFC script that plays background ambiance sfx, preferably with an option to set how many can be played and how many frames to wait before playing each one.

D0 is the sound, D1 is the time.

CODE
ffc script SoundPlayer
{
    void run(int sound, int loopTime)
    {
        while(true)
        {
            Game->PlaySound(sound);
            Waitframes(loopTime);
        }
    }
}


QUOTE
2) An item script that will make the sword flash when the spin attack is charged. This would most likely be attached to the spin attack scroll.

Can't be done with an item script. Has to be global.

CODE
int swordChargeTime;

global script SwordFlash
{
    void run()
    {
        while(true)
        {
            DoSwordFlash();
            Waitframe();
        }
    }
    
    void DoSwordFlash()
    {
        if(Link->Action==LA_CHARGING)
        {
            swordChargeTime++;
            if(swordChargeTime==63)
            {
                lweapon sword;
                for(int i=Screen->NumLWeapons(); i>0; i--)
                {
                    sword=Screen->LoadLWeapon(i);
                    if(sword->ID!=LW_SWORD)
                        continue;
                    
                    sword->Flash=true;
                    return;
                }
            }
        }
        else if(swordChargeTime!=0)
        {
            swordChargeTime=0;
            
            lweapon sword;
            for(int i=Screen->NumLWeapons(); i>0; i--)
            {
                sword=Screen->LoadLWeapon(i);
                if(sword->ID!=LW_SWORD)
                    continue;
                
                sword->Flash=false;
                sword->CSet=sword->OriginalCSet;
                return;
            }
        }
    }
}


#4 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 17 May 2011 - 04:19 PM

Thanks Saffith! Once again you have helped me in my time of need! thank you so much!

EDIT: By the way, how do you set the flash cset for the flashing sword script?

Edited by Sepulcher, 17 May 2011 - 05:06 PM.


#5 Saffith

Saffith

    IPv7 user

  • Members

Posted 18 May 2011 - 03:31 PM

It just enables atuo-flash, so it uses the sprite's setting.

#6 Xenix

Xenix

    Well excuse me princess.

  • Members
  • Real Name:Chris
  • Location:Newport News, VA

Posted 18 May 2011 - 05:47 PM

Thanks Saffith! You've given a great deal of service to my needs. thanks! if this were a restaurant you would get a $50.00 tip. lol

EDIT: It won't work. I have combined the global scripts together, but it doesn't work. I have tried everything. should I send you the script file?

EDIT2: It's working now. I forgot to place the "DoSwordFlash();" part in the script. Thanks Saffith!

Edited by Sepulcher, 18 May 2011 - 07:51 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users