Animindex problem
Posted: Sat Jan 05, 2013 12:51 am
Hello everybody. I'm having an issue with animindex.
Here is my code:
PowerUp-> Collision-> TopSide of Brick-> Reapeat: Yes-> Script Editor
Now, This code will not work for me. But, If i set "if(CoinBrick.animindex==2)" to "if(CoinBrick.animindex==0)" it will work.
like this:
PowerUp-> Collision-> TopSide of Brick-> Reapeat: Yes-> Script Editor
Any ideas why this would be happening?
Thanks in advance! and +1
-RippeR
Here is my code:
PowerUp-> Collision-> TopSide of Brick-> Reapeat: Yes-> Script Editor
- Code: Select all
if(CoinBrick.animindex==2)
{
yvelocity=-10;
yvelocity=min(max(yvelocity, -10), -10);
}
Now, This code will not work for me. But, If i set "if(CoinBrick.animindex==2)" to "if(CoinBrick.animindex==0)" it will work.
like this:
PowerUp-> Collision-> TopSide of Brick-> Reapeat: Yes-> Script Editor
- Code: Select all
if(CoinBrick.animindex==0)
{
yvelocity=-10;
yvelocity=min(max(yvelocity, -10), -10);
}
Any ideas why this would be happening?
Thanks in advance! and +1
-RippeR