Page 1 of 1

PostPosted: Fri Aug 25, 2006 12:20 am
by Game A Gogo
there seems to be a problem whit the "less then(<)" and "greater then(>)" sign in the sript editor when you put it in drawing, the action is use if Acotr1 is more to left or right then it dos an action.

PostPosted: Fri Aug 25, 2006 12:26 am
by makslane
Can you post the code?

PostPosted: Fri Aug 25, 2006 12:46 am
by Game A Gogo
ok, here it is:
Code: Select all
if(PlayerN==1)
{
if(Pause)
{
    if(Ball.x<x)
    {
        x-=Level+1/2;
    }
    else if(Ball.x>x)
    {
        x+=Level+1/2;
    }
}
}

PostPosted: Fri Aug 25, 2006 12:54 am
by makslane
What's the problem?

PostPosted: Fri Aug 25, 2006 12:59 am
by Game A Gogo
The actor just remain in place, even if the Ball actor is moving.

PostPosted: Fri Aug 25, 2006 1:08 am
by makslane
Make sure the value of PlayerN is 1 and Pause is different of 0.
Put some tests in your code to track this.

You can use a actor text to debug.

PostPosted: Fri Aug 25, 2006 1:18 pm
by DilloDude
Code: Select all
1/2
I think this is the problem. Since 1 is an integer, it does an integer ivision returning the result as an integer. 1 / 2 = .5, when converted to an integer it equals 0. Try
Code: Select all
1.0/2
If you have a variable, you can use
Code: Select all
(var + .0)
or
Code: Select all
round(var)//because round returns a real.

PostPosted: Sun Aug 27, 2006 9:44 pm
by Game A Gogo
then maybe this will work:
Code: Select all
(PlayerN+1)/2;
?