You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><spandata-keyref="GML_Visual">GML Visual</span> is the <strong>visual scripting</strong> method for programming with the <ahref="../GameMaker_Language/GameMaker_Language_Index.htm">GameMaker Language</a> (GML). It consists of using <strong>action blocks</strong> to construct game logic in a visual and intuitive way, and is an ideal tool for people who are learning programming, or for people that have a more visual inclination.</p>
20
20
<p>The <spandata-keyref="GML_Visual">GML Visual</span> section of the manual is split into the following sections:</p>
<p><spandata-keyref="GML_Visual">GML Visual</span> is a visual scripting tool that can be used to create your games without actually typing any code. That's not to say that you aren't programming code when you use <spandata-keyref="GML_Visual">GML Visual</span>, as you are, only that your code is created and presented in a visual way using "blocks" of <strong>actions </strong>rather than text. Actions are simple <aclass="glossterm" data-glossterm="expression" href="#">expression</a><spanclass="glossextra">s</span> or <aclass="glossterm" data-glossterm="statement" href="#">statement</a><spanclass="glossextra">s</span> that can be "chained" together to have an instance of an object do something when placed in a room. For example, you could have an action in a <strong>Create Event</strong> to move an instance in a random direction, and another action in a <strong>Collision Event</strong> to make it bounce off the things it collides with (for more information on the different events available and how they work together see the section on <ahref="../../The_Asset_Editors/Object_Properties/Object_Events.htm">Object Events</a>).</p>
19
-
<p><imgalt="GML Visual Overview Screen" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Overview_Main.png" />The image above shows a typical object open on a <ahref="../../Introduction/Workspaces.htm">workspace</a> to be edited. It has an "Event" window and a "Code" window chained to it, and in the code window you can see where we have constructed our GML Visual. Let's look a bit closer at this window and see what options are available to us:</p>
19
+
<p><imgalt="GML Visual Overview Screen" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Overview_Main.png" />The image above shows a typical object open on a <ahref="../../Introduction/Workspaces.htm">workspace</a> to be edited. It has an "Event" window and a "Code" window chained to it, and in the code window you can see where we have constructed our <spandata-keyref="GML_Visual">GML Visual</span>. Let's look a bit closer at this window and see what options are available to us:</p>
20
20
<p><imgalt="GML Visual Properties Screen" class="center" src="../../assets/Images/Scripting_Reference/Drag_And_Drop/Overview/DnD_Overview_Properties.png" />Below you can find more information on each of the sections shown:</p>
<pclass="dropspot">The <strong>toolbox </strong>is where all the GML Visual actions are stored, with different sections holding collections (libraries) of actions that are similar or related. Each collection of actions is related to a specific theme or common purpose and you simply click <imgalt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21" /> and drag the required action from the toolbox into the action block workspace to add it to the current event. To make things simpler - as there are a lot of actions - you can use the "Search" bar at the top to search for a specific action or to filter the visible actions (type "draw" for example to get all the drawing actions), and you can also click <imgalt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21" /> and drag icons from any library into your <strong>Favourites</strong> folder to keep commonly used actions together. This is particularly useful if there are certain things you'll be doing again and again. The favourites folder can be cleared by clicking the small "bin" icon.</p>
41
+
<pclass="dropspot">The <strong>toolbox </strong>is where all the <spandata-keyref="GML_Visual">GML Visual</span> actions are stored, with different sections holding collections (libraries) of actions that are similar or related. Each collection of actions is related to a specific theme or common purpose and you simply click <imgalt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21" /> and drag the required action from the toolbox into the action block workspace to add it to the current event. To make things simpler - as there are a lot of actions - you can use the "Search" bar at the top to search for a specific action or to filter the visible actions (type "draw" for example to get all the drawing actions), and you can also click <imgalt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21" /> and drag icons from any library into your <strong>Favourites</strong> folder to keep commonly used actions together. This is particularly useful if there are certain things you'll be doing again and again. The favourites folder can be cleared by clicking the small "bin" icon.</p>
42
42
<pclass="dropspot">For a complete list of the actions available, as well as what arguments they take and how they can be chained, please see the <adata-xref="{title}" href="../Drag_And_Drop_Reference/DnD_Reference.htm">GML Visual Reference</a> section.</p>
43
43
<pclass="dropspot">You can use the right mouse button <imgalt="LMB Icon" class="icon" height="24" src="../../assets/Images/Icons/Icon_LMB.png" width="21" /> on any action in the toolbox to open the following menu:</p>
<liclass="dropspot"><b>Make </b>/ <strong>Remove Favourite</strong>: This will add or remove the action to the <strong>Favourites</strong> library at the top of the toolbox. This library is where you can create a custom group of actions that you use regularly, reducing the amount of time needed to look for them in their actual libraries.</li>
49
49
<liclass="dropspot"><strong>Clear Favourites</strong>: Selecting this will remove all actions from the Favourites library.</li>
50
50
<liclass="dropspot"><strong>Clear Recently Used</strong>: Selecting this will remove all actions from the Recently Used library.</li>
51
-
<liclass="dropspot"><strong>Collapse All</strong>: This option will collapse all theGML Visual libraries so that only the library titles are visible, and not the action nodes. Each library can be expanded again by clicking on them.</li>
51
+
<liclass="dropspot"><strong>Collapse All</strong>: This option will collapse all the<spandata-keyref="GML_Visual">GML Visual</span> libraries so that only the library titles are visible, and not the action nodes. Each library can be expanded again by clicking on them.</li>
<p>This section of the manual lists all the different actions available to you when using <adata-xref="{title}" href="../Drag_And_Drop_Index.htm">GML Visual</a> to program your game. Below you can find each of the different <strong>Action Libraries</strong> available to you from the object <spandata-keyref="GML_Visual">GML Visual</span><ahref="../Drag_And_Drop_Overview/DnD_Overview.htm">Toolbox</a>, and within each library section the individual actions are explained, along with examples of use.</p>
<p>You can use GameMaker Language to program your games in two different ways: by placing blocks to "write" code visually, or by writing code manually.</p>
17
17
<p>The first option, <adata-xref="{title}" href="Drag_And_Drop/Drag_And_Drop_Index.htm">GML Visual</a>, is best suited for beginners and hobbyists who want to get started making their own games quickly.</p>
18
18
<p>The second option, <adata-xref="{title}" href="GameMaker_Language/GameMaker_Language_Index.htm">GML Code</a>, allows you to harness the full power of GameMaker Language by writing your code manually.</p>
<pclass="dropspot">The following <strong>unary</strong> operators are provided:</p>
140
140
<ulclass="dropspotlist">
141
-
<liclass="dropspot"><spanclass="inline2"><strong>!</strong></span>: boolean "not", so <spanclass="inline2">!true == false</span></li>
141
+
<liclass="dropspot"><spanclass="inline2"><strong>!</strong></span>: boolean "not", so <spanclass="inline2">!true == false</span></li>
142
142
<liclass="dropspot"><spanclass="inline2"><strong>-</strong></span>: negates the next real or integer value (not valid for strings or booleans)</li>
143
143
<liclass="dropspot"><spanclass="inline2"><strong>~</strong></span>: negates the next value bitwise</li>
<p>This section of the manual contains all the information required to understand and use <spandata-keyref="GML_Code">GML Code</span>. The runtime functions in this language can be used to create your games and is added into objects from <adata-xref="{title}" href="../../The_Asset_Editors/Objects.htm">The Object Editor</a>, although it can also be used along with <adata-xref="{title}" href="../../Drag_And_Drop/Drag_And_Drop_Index.htm">GML Visual</a>. Below you can see a typical image of an object with the code editor open on an event:</p>
19
19
<p><imgalt="Object, Events and Code Overview" class="center" src="../../assets/Images/Scripting_Reference/GML/Overview/Code_Overview_Main.png" />Each event has its own tab in the editor and you can add, edit, or remove code from them at any time (for more information on events see <adata-xref="{title}" href="../../The_Asset_Editors/Object_Properties/Object_Events.htm">Object Events</a>). The code itself must have a basic structure and can contain resource indices, variables, functions, expressions, keywords, etc. all of which are explained in the sections below. If you are a novice to programming or making the switch from <adata-xref="{title}" href="../../Drag_And_Drop/Drag_And_Drop_Index.htm">GML Visual</a>, it is recommended that you start with the page on <adata-xref="{title}" href="Basic_Code_Structure.htm">Basic Code Structure</a> and then read through all the other pages in this section, testing code from each one within <spandata-keyref="GameMaker Name">GameMaker</span> itself.</p>
20
20
<p>You can use <ahref="../../Setting_Up_And_Version_Information/IDE_Preferences/Feather_Settings.htm">Feather</a> for intelligent code completion and error reporting in your <spandata-keyref="GML_Code">GML Code</span> scripts.</p>
0 commit comments