![]() ![]() One of the most common methods of accessing or changing a variable in another instance is to use its object name as an identifier, and then use a point ". Thankfully the GameMaker Language comes equipped with mechanisms to achieve this. In the sections dedicated to variables you found out how to create and use variables within a single instance, or on a global scope, but what happens if you want one instance to access a variable in another, different instance? There are many cases when you may want to do this, for example in a collision with a bullet object, you may want to find out how much damage the bullet does by accessing a variable in the bullet, or you might want to stop the motion of all the balls in a puzzle, or you might want to move the main character to a particular position, or any number of other situations you typically come across in any game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |