Reply to Re: Variable Isolation
If you don't have an account, just leave the password field blank.
Attach this script to a sprite and talk to it to test it.
Just as I finished this I saw that metatarasal beat me to it so I haven't really checked his script yet.
void talk (void) { int &n4 = 1; //&n3 is the number you want counted from right to left. //In this example we want the 4 in 126532485 which is the 3rd number. int &n3 = 3; if (&n3 > 1) { loop: &n4 *= 10 &n3 -= 1 if (&n3 > 1) { goto loop; } } //&n1 is the number you're taking a number from being 126532485 in this example int &n1 = 126532485; int &n2 = &n1; &n2 /= &n4; &n4 *= 10; &n1 /= &n4; &n1 *= 10; &n2 -= &n1; //Showing the outcome. say_stop("&n2", ¤t_sprite); }
Just as I finished this I saw that metatarasal beat me to it so I haven't really checked his script yet.