Reply to Re: Sprite numbers
If you don't have an account, just leave the password field blank.
well I was correct this script works so you only have to define one global variable and both sprites were now able to be totally controlled.
void main (void)
{
int &per1;
int &per2;
wait(500);
external("duck1", "gvoice");
&per1 = &voice;
wait(500);
say("hello dink &per1", &per1);
wait(500);
external("duck2", "gvoice");
&per2 = &voice;
wait(500);
say_stop("don't listen to him dink", &per2);
wait(500);
say_stop("hello again", &per1);
wait(500);
say_stop("you stupid", &per2);
}
I did some more testing to see what the least amount of work had to be done to make it work.
int &per1;
int &per2;
int &per3;
wait(100);
external("duck1", "gvoice");
&per1 = &voice;
wait(100);
external("duck2", "gvoice");
&per2 = &voice;
wait(100);
external("duck3", "gvoice");
&per3 = &voice;
this will work for as many sprites as you want. I think this can be used for other things two so if you just want to use one variable to create a number of different variables in a script you could use this method.
void main (void)
{
int &per1;
int &per2;
wait(500);
external("duck1", "gvoice");
&per1 = &voice;
wait(500);
say("hello dink &per1", &per1);
wait(500);
external("duck2", "gvoice");
&per2 = &voice;
wait(500);
say_stop("don't listen to him dink", &per2);
wait(500);
say_stop("hello again", &per1);
wait(500);
say_stop("you stupid", &per2);
}
I did some more testing to see what the least amount of work had to be done to make it work.
int &per1;
int &per2;
int &per3;
wait(100);
external("duck1", "gvoice");
&per1 = &voice;
wait(100);
external("duck2", "gvoice");
&per2 = &voice;
wait(100);
external("duck3", "gvoice");
&per3 = &voice;
this will work for as many sprites as you want. I think this can be used for other things two so if you just want to use one variable to create a number of different variables in a script you could use this method.