Reply to Re: Sprite numbers
If you don't have an account, just leave the password field blank.
wait thanks redink i finally figured out what the conversion things meant and it worked without using any global variables. The problem i have now is kinda stupid but, the first time i go on to the screen another sprite besides the duck talks but if i leave and come back everytime after that it works fine. I am just gonna say its some kind of bug in the engine and hope it doesn't mess up anything.
Update: Actually its not working at all. It seems to work if I use global variable to assign the values but not if i don't. For example this script does not work.
int &voice1 = sp(25);
int &voice2 = sp(30);
say("hello mertle", &voice1);
say("hello betty", &voice2);
this will do nothing. If i make &voice1 and &voice2 global variables and do this in scripts attached to the sprites.
&voice1 = sp(25); attached to mertle sprite
&voice2 = sp(30); attached to betty sprite
then in a seperate script do the following.
say("hello mertle", &voice1);
say("hello betty", &voice2);
it works. I am not sure why the first way does not work but the second way does. Anyone know why?
Update: Actually its not working at all. It seems to work if I use global variable to assign the values but not if i don't. For example this script does not work.
int &voice1 = sp(25);
int &voice2 = sp(30);
say("hello mertle", &voice1);
say("hello betty", &voice2);
this will do nothing. If i make &voice1 and &voice2 global variables and do this in scripts attached to the sprites.
&voice1 = sp(25); attached to mertle sprite
&voice2 = sp(30); attached to betty sprite
then in a seperate script do the following.
say("hello mertle", &voice1);
say("hello betty", &voice2);
it works. I am not sure why the first way does not work but the second way does. Anyone know why?