Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gdevelop:documentation:manual:global_variables [2015/05/18 12:28]
127.0.0.1 external edit
gdevelop:documentation:manual:global_variables [2020/05/31 11:53] (current)
rapperdinesh [Basic changes]
Line 5: Line 5:
 {{ gdevelop:​documentation:​manual:​variables.png?​nolink |}} {{ gdevelop:​documentation:​manual:​variables.png?​nolink |}}
  
-Variables can be used in events without declaring them, but declaring variables allows to attribute initial values and declared variables are more efficient than not declared variables when used intensively in events.+Variables can be used in events without declaring them, but declaring variables allows to attribute ​of initial values and declared variables are more efficient than not declared variables when used intensively in events.
  
 ===== Basic changes ===== ===== Basic changes =====
  
-Use the first button of the toolbar to add a new variable. You can then change its value by double ​cliking ​on it. +Use the first button of the toolbar to add a new variable. You can then change its value by double-clicking ​on it. 
-Toolbar ​can also be used to reorder the variables, delete the selected variable or modify the name of an existing variable.+The toolbar ​can also be used to reorder the variables, delete the selected variableor modify the name of an existing variable.
  
 ===== Finding undeclared variables ===== ===== Finding undeclared variables =====
Line 18: Line 18:
 {{ gdevelop:​documentation:​manual:​searchforundeclaredvariables.png?​nolink |}} {{ gdevelop:​documentation:​manual:​searchforundeclaredvariables.png?​nolink |}}
  
-After clicking on it, GDevelop will scan the project and will present you a list containing the name of variables used in the events but not declared ​in the list. You can then check in this list the variable you want to be added to the already declared variables.+After clicking on it, GDevelop will scan the project and will present you with a list containing the name of variables used in the events but not declared ​on the list. You can then check in this list the variable you want to be added to the already declared variables.
  
 ===== Declaring structures ===== ===== Declaring structures =====
  
-GDevelop supports the use of **structures**:​ structures are variables that contains ​other variables, called the **child variables**,​ instead of a single value or text.+GDevelop supports the use of **structures**:​ structures are variables that contain ​other variables, called the **child variables**,​ instead of a single value or text.
  
-You can add a child to a variable by making a right click on it, and choosing ''​Add a new child'':​ The variable will be transformed into a structure and the child variable will be added.\\ +You can add a child to a variable by making a right-click on it, and choosing ''​Add a new child'':​ The variable will be transformed into a structure and the child variable will be added.\\ 
-In the events, you can access ​to a child variable using this syntax: ''​Variable.ChildName''​. You can also enter a text expression instead of the child name using brackets+In the events, you can access a child variable using this syntax: ''​Variable.ChildName''​. You can also enter a text expression instead of the child name using brackets
 : ''​Variable.["​Child"​+ToString(Variable(Index))]''​ : ''​Variable.["​Child"​+ToString(Variable(Index))]''​
  
 You can learn more about structures in [[gdevelop:​tutorials:​howtousevariables|this tutorial]]. You can learn more about structures in [[gdevelop:​tutorials:​howtousevariables|this tutorial]].