Page 2 of 2

Re: Camera move

PostPosted: Tue Nov 01, 2011 9:34 am
by skydereign
BogdansB wrote:now I want to make the score just add the -y and not the +y. how to do it?

This code will give you more points, the lower you go.
Code: Select all
score = player.y/10;

BogdansB wrote:and how to stop the score adding the y of the player after the player destroys?

Use ActorCount. It's a function that returns how many of a certain actor there are.
Code: Select all
if(ActorCount("player")==1)
{
    score = player.y/10;
}

Re: Camera move

PostPosted: Tue Nov 01, 2011 3:26 pm
by BogdansB
thanks but i want that if player goes down, the score doesn't change at all, but if he goes up, then the score is grown up.

Re: Camera move

PostPosted: Tue Nov 01, 2011 8:54 pm
by skydereign
Oh, that's what you meant. For that, you can use the max function.
Code: Select all
score = max(score, -player.y/10);

Re: Camera move

PostPosted: Tue Nov 01, 2011 10:51 pm
by BogdansB
thank you very much