Quote:
Originally Posted by sssssssssss
I saw this a few weeks ago, but with how small of a thing I'm doing it's a bit much, and the work to redo all my stuff is a bit cumbersome at this point (I'd rather have one way than 2 separate ones for the same thing in different places), but it is much nicer don't get me wrong.
I went ahead and just dropped the idea I was doing. Keeping this open for the answers though, maybe something will help someone else possibly.
|
Can't really test it right now but it looks like you want to do an if/else statement instead of two if statements, try this and see if it works?
PHP Code:
SCRIPT
function onPlayerEnters()
{
play( params[ 1]);
this.moveway = params[ 2];
rollImg();
}
function rollImg()
{
if ( this.moveway < 2)
{
echo( "left up");
for ( findImg( 1).rotation = 0; findImg( 1).rotation > (-(2 * pi)); findImg( 1).rotation -= (pi / 4);)
sleep(0.05);
}
else
{
echo( "down right1");
for ( findImg( 1).rotation = 0; findImg( 1).rotation < (2 * pi); findImg( 1).rotation += (pi / 4);)
sleep(0.05);
}
}
SCRIPTEND