hi
i need help for a script.
Need to rotate a sprite in a right position. At each left click the sprite need rotate of the 45 °m with my script the spirte rotate only a time of 45° and stop.
My Wrong Script is
#include "scripts\base.inc"
global tavola=Scene.GetNode("Tavola");
global degree;
degree= 45;
tavola.Rotatable = true;
on "LeftClick"
if (degree==45)
{
tavola.Rotate = degree;
degree=90;
}
on "LeftClick"
if (degree==90)
{
tavola.Rotate = degree;
degree=135;
}
on "LeftClick"
if (degree==135)
{
degree.Rotate = degree;
degree=180;
}
on "LeftClick"
if (degree==180)
{
tavola.Rotate = degree;
degree=180;
}
tk for help