score (deprecated)



Returns: Real


This variable is global in scope and is used to hold a numeric value which is usually used for the game score. Bear in mind this is not necessarily always the case - just because it's called "score" doesn't mean it has to be used for the score and it can be used to hold any integer value you choose.

IMPORTANT! This variable is only included to support legacy projects from previous versions of GameMaker and should not be used in new projects as it is deprecated and in future versions or updates may be removed entirely.


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

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 global score and then destroys itself.