Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Gamemaker Essentials
  • Table Of Contents Toc
  • Feedback & Rating feedback
Gamemaker Essentials

Gamemaker Essentials

3.8 (13)
close
close
Gamemaker Essentials

Gamemaker Essentials

3.8 (13)

Overview of this book

This book is for users experienced with game development who now want to learn how to develop games in GameMaker: Studio in a fast-paced way.
Table of Contents (11 chapters)
close
close

Variables


As in any programming language, the first things you should know is how to initialize different types of variables and how each variable type can be used. In GameMaker, there are four main types of variables: instance, local, global, and arrays.

Instance variables

An instance variable is one that is local to the instance it is initialized in. This means that it is not directly accessible in any other instance within your game and must have the instance ID for it to be referenced from outside of the instance it is created in.

To initialize an instance variable, type its name, the equals sign (=), and then its value. The value can be either a real or a string. If the value is a string, then the text must be enclosed in quotation marks.

The following is a sample of two instance variables being initialized in GameMaker:

Once these variables have been initialized, they can be used in any event of the object.

Local variables

A local variable is a variable that is local to the code block or...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Gamemaker Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon