All what it is is a globle script that every time Link takes a step a SFX plays
Thanks
~Billy
I need a script
Started by
Old Inactive Member
, Mar 16 2008 04:34 PM
5 replies to this topic
#1
Posted 16 March 2008 - 04:34 PM
#2
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.
Or alternatively, you could use that one.
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();
}
}
}
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
Posted 16 March 2008 - 06:11 PM
?
umm, lets see...
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.
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
Posted 16 March 2008 - 06:28 PM
Yours won't work cause you didn't declare 'delay' =P
#5
Posted 16 March 2008 - 06:32 PM
D'oh!!! ...well then it's fixed now.
...but if you plan to give Link the flippers I would use Joe123's script.
...but if you plan to give Link the flippers I would use Joe123's script.
#6
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