Advanced Item Actions and Variables
摘要
Variables in computer programming are symbols, usually expressed as letters, numbers or words, that can store and manipulate values for use later. If you’re earning points in a game, your score is a variable that starts at zero and increases every time you collect a coin. If you’re asked to give the main character a name at the beginning of the game, the name you choose is stored in a variable and recalled every time it’s needed. In this chapter, we will explore how you can use variables to control in-game events.