Object rotation

J

Josip

Guest
Hey,

I have an object that is rotating to right with some speed.
Now i want that object at specific time stops and start to rotating to another direction (to left).

My code:

Code:
if(global.score > 0)
{
image_angle += 1;
}

if(global.score > 10)
{
image_angle += 10;
}

if(global.score > 12)
{

image_angle -= 10;

//This is where i tried to change direction to the left but it is not working.
}
 
J

Jordan Vigay

Guest
replace the code with this:

Code:
if(global.score > 0 and global.score < 11)
{
image_angle += 1;
}

if(global.score > 10 and global.score < 13)
{
image_angle += 10;
}

if(global.score > 12)
{
image_angle -= 10;
}
should work :)
 
J

Josip

Guest
replace the code with this:

Code:
if(global.score > 0 and global.score < 11)
{
image_angle += 1;
}

if(global.score > 10 and global.score < 13)
{
image_angle += 10;
}

if(global.score > 12)
{
image_angle -= 10;
}
should work :)
Works perfectly, thank you.
 
Top