mouse pointer movement
Posted: Tue Mar 16, 2004 11:10 pm
ok this scrypt is in the drawactor for my moving guy. place is the target for the movement. It works fine exept that when the actor is moving east and west the animation doesent run. Every other animation runs fine though, and when the actor stops at the destination while walking east or west it then plays the animation. Well heres the scrypting:
if(x < place.x && y == place.y) //right
{
ChangeAnimation("Event Actor", "walkE", FORWARD);
x = x + 1;
};
if(x > place.x && y == place.y) //left
{
ChangeAnimation("Event Actor", "walkW", FORWARD);
x = x -1;
};
if(y < place.y && x == place.x) //down
{
ChangeAnimation("Event Actor", "South", FORWARD);
y = y + 1;
};
if(y > place.y && x == place.x) //up
{
ChangeAnimation("Event Actor", "north", FORWARD);
y = y -1;
};
if(y > place.y && x > place.x) //NW
{
ChangeAnimation("Event Actor", "NW", FORWARD);
y -= 1;
x -= 1;
};
if(y > place.y && x < place.x) //NE
{
ChangeAnimation("Event Actor", "NE", FORWARD);
y -=1;
x +=1;
};
if(y < place.y && x < place.x) //SE
{
ChangeAnimation("Event Actor", "SW", FORWARD);
y +=1;
x +=1;
};
if(y < place.y && x > place.x) //SW
{
ChangeAnimation("Event Actor", "SE", FORWARD);
y +=1;
x -=1;
};
Also the pointer animation i have displays under the system pointer. How do i get rid of the system pointer, or change it to the new one?
~peace~
if(x < place.x && y == place.y) //right
{
ChangeAnimation("Event Actor", "walkE", FORWARD);
x = x + 1;
};
if(x > place.x && y == place.y) //left
{
ChangeAnimation("Event Actor", "walkW", FORWARD);
x = x -1;
};
if(y < place.y && x == place.x) //down
{
ChangeAnimation("Event Actor", "South", FORWARD);
y = y + 1;
};
if(y > place.y && x == place.x) //up
{
ChangeAnimation("Event Actor", "north", FORWARD);
y = y -1;
};
if(y > place.y && x > place.x) //NW
{
ChangeAnimation("Event Actor", "NW", FORWARD);
y -= 1;
x -= 1;
};
if(y > place.y && x < place.x) //NE
{
ChangeAnimation("Event Actor", "NE", FORWARD);
y -=1;
x +=1;
};
if(y < place.y && x < place.x) //SE
{
ChangeAnimation("Event Actor", "SW", FORWARD);
y +=1;
x +=1;
};
if(y < place.y && x > place.x) //SW
{
ChangeAnimation("Event Actor", "SE", FORWARD);
y +=1;
x -=1;
};
Also the pointer animation i have displays under the system pointer. How do i get rid of the system pointer, or change it to the new one?
~peace~