score


Syntax:

score;


Returns:

Real


Description

This built in instance variable is used to hold a numeric value for the object score (note that this is not necessarily always the case - just because it's called "score" doesn't mean it has to be used for the scoring... it can hold any real or integer value you wish for your game).


Example:

if place_meeting(x, y, obj_Bullet)
   {
   score += 10;
   instance_destroy();
   }

The above code checks the current instance to see if there is a collision with the instance of the object indexed in "obj_Bullet", and if there is, it adds 10 to the score and then destroys itself.