Global variable for holding the game score.



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.


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.

Back: Global Variables
Next: health
© Copyright YoYo Games Ltd. 2018 All Rights Reserved