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 Construct 2 Game Development by Example
  • Table Of Contents Toc
  • Feedback & Rating feedback
Construct 2 Game Development by Example

Construct 2 Game Development by Example

By : John Bura
3.8 (9)
close
close
Construct 2 Game Development by Example

Construct 2 Game Development by Example

3.8 (9)
By: John Bura

Overview of this book

This book uses practical examples to teach readers, and imparts the key skills and techniques of working in Construct 2 through building complete game projects. This book is for complete beginners who have always wanted to learn how to make games and have never tried. It is the perfect introduction to game development, design, and production.
Table of Contents (11 chapters)
close
close
9
A. Where to Go from Here
10
Index

Variables in Construct 2


Like most things in Construct 2, variables are really simple. Even though adding variables is fairly straightforward in other languages, Construct 2 makes it easy.

Adding a variable

Adding variables in games is really important. Without variables, you cannot store any data. This will make the game almost nonfunctional, and it limits you to small games.

To add a variable, go to your event sheet and right-click on it. This should bring up a cascading menu. Clicking on the Add event icon will let you add a variable:

There are two types of variables in Construct 2: global and local variables. Variables can be seen in different places. Global variables will be seen throughout the entire game. Local variables you want only to be seen by a game object or a function.

Creating a global variable

Right-click on the event sheet and you can add a global variable. Go ahead and click on Add global variable.

As you can see in the preceding screenshot, there are four fields. You can name...

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.
Construct 2 Game Development by Example
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