Jump to content

Photo

I need a script


  • Please log in to reply
5 replies to this topic

#1 Old Inactive Member

Old Inactive Member

    I'm back sorta.

  • Members

Posted 16 March 2008 - 04:34 PM

All what it is is a globle script that every time Link takes a step a SFX plays

Thanks

~Billy



#2 Joe123

Joe123

    Retired

  • Members

Posted 16 March 2008 - 05:45 PM

If you can gimme a delay in frames (60 frames per second) between the sound effect playing, I can whip this up in a jiffy.

CODE
const int dly = 0; //set the delay between the sfx playing here
const int stepsfx = 0; //set the sfx to play here

global script slot 2{
    void run(){
    int tmr;
        while(true){
            if(Link->Action == LA_WALKING){
                tmr++;
                if(tmr == dly){Game->PlaySound(stepsfx); tmr = 0;}
            }
        Waitframe();
        }
    }
}


Or alternatively, you could use that one.

Edited by Joe123, 16 March 2008 - 06:12 PM.


#3 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 16 March 2008 - 06:11 PM

?

umm, lets see...
CODE

int squeaky_feet=1;
int sound_delay=????; //set here

global script globle{
void run(){
  int delay;
  while(true){
   Waitframe();
   if(delay>0)delay--;
   else if(squeaky_feet==1){
    if(Link->InputDown||Link->InputUp||Link->InputLeft||Link->InputRight){
     if(delay==0){Game->PlaySound(sfx_here);delay=sound_delay;}
    }
   }
  }
}
}


Haha! posted at the same time..

...Oh wait, you posted yours first.....hmm, that's like exactally the same script.....your's is good too.

Ah, Mine's funnier! ..oh, you used LA_WALKING. hmm, that's probably much better than Input.

Edited by Gleeok, 16 March 2008 - 06:29 PM.


#4 Joe123

Joe123

    Retired

  • Members

Posted 16 March 2008 - 06:28 PM

Yours won't work cause you didn't declare 'delay' =P

#5 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 16 March 2008 - 06:32 PM

D'oh!!! ...well then it's fixed now. icon_neutral.gif




...but if you plan to give Link the flippers I would use Joe123's script.

#6 Old Inactive Member

Old Inactive Member

    I'm back sorta.

  • Members

Posted 17 March 2008 - 11:06 AM

Thanks i will use joe's for mine beacsue i am giving the filpers out in this quest


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users