Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">asset_get_index</span></h1>
<p>This function gets the handle for a game asset from its name.</p>
<p>If the asset is not found, the function will return a value of -1, otherwise it will return the handle for the asset being checked. This handle can then be used in other functions as you would any other handle, like <span class="inline2"><a data-xref="{title}" href="../Sprites/Sprite_Instance_Variables/sprite_index.htm">sprite_index</a></span> or <span class="inline2"><a data-xref="{title}" href="../Paths/Path_Variables/path_index.htm">path_index</a></span>, for example.</p>
<p>This function gets the handle for an <span data-keyref="Type_Asset"><a href="../../../../The_Asset_Editors/The_Asset_Editors.htm" target="_blank">Asset</a></span> from its name.</p>
<p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"> </span> If an <span data-keyref="Type_Asset"><a href="../../../../The_Asset_Editors/The_Asset_Editors.htm" target="_blank">Asset</a></span> handle is passed, its index number is returned (similar to passing a handle into <span class="inline3_func"><a data-xref="{title}" href="../../Variable_Functions/real.htm">real</a></span>). </p>
<p>If the asset is not found, the function will return a value of -1. This handle can then be used in other functions as you would any other handle, like <span class="inline2"><a data-xref="{title}" href="../Sprites/Sprite_Instance_Variables/sprite_index.htm">sprite_index</a></span> or <span class="inline2"><a data-xref="{title}" href="../Paths/Path_Variables/path_index.htm">path_index</a></span>, for example.</p>
<h3>Usage Notes</h3>
<ul class="colour">
<li>Although this function can be used to reference assets from strings (see the first example below), you should always make sure that the asset exists before using it. Otherwise, you may get errors that will crash your game.</li>
Expand All @@ -35,7 +36,7 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>name</td>
<td><span data-keyref="Type_String"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td><span data-keyref="Type_String"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">String</a></span> or <span data-keyref="Type_Asset"><a href="../../../../The_Asset_Editors/The_Asset_Editors.htm" target="_blank">Asset</a></span></td>
<td>The name of the game asset to get the handle of (a string).</td>
</tr>
</tbody>
Expand Down Expand Up @@ -73,7 +74,7 @@ <h4>Example 2: &quot;MarkTagAsUsed&quot; pragma</h4>
<div style="float:right">Next: <a data-xref="{title}" href="asset_get_type.htm">asset_get_type</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2026 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
asset_get_index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ <h4>Example:</h4>
<div style="float:right">Next: <a data-xref="{title}" href="alarm.htm">alarm</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2026 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
collision_space
colspace
-->
<!-- TAGS
collision_space
colspace
-->
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1><span data-field="title" data-format="default">particle_get_info</span></h1>
<p>The tables below list all variables that are available in each of these three structs.</p>
<p><a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down" href="#">Particle System Info</a></p>
<div class="droptext" data-targetname="drop-down">
<table id="particle_system_info_struct" style="caption-side: top">
<table id="particle_system_info_struct" style="caption-side: top" class=" cke_show_border">
<caption>Particle System Info Struct</caption>
<colgroup>
<col style="width:33.33%" />
Expand All @@ -53,52 +53,52 @@ <h1><span data-field="title" data-format="default">particle_get_info</span></h1>
</tr>
<tr>
<td><span class="inline">name</span></td>
<td><span data-keyref="Type_String"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">String</a></span></td>
<td>The name of the particle system asset, or an empty string <span class="inline2">&quot;&quot;</span> for a <span data-keyref="Type_ID_PartSys"><a href="Particle_Systems/part_system_create.htm" target="_blank">Particle System Instance</a></span> not created from a <span data-keyref="Type_Asset_ParticleSystem"><a href="../../../../The_Asset_Editors/Particle_Systems.htm" target="_blank">Particle System Asset</a></span>.</td>
<td><span data-keyref="Type_String"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">String</a></span></td>
<td>The name of the particle system asset, or an empty string <span class="inline2">&quot;&quot;</span> for a <span data-keyref="Type_ID_PartSys"><a target="_blank" href="Particle_Systems/part_system_create.htm">Particle System Instance</a></span> not created from a <span data-keyref="Type_Asset_ParticleSystem"><a target="_blank" href="../../../../The_Asset_Editors/Particle_Systems.htm">Particle System Asset</a></span>.</td>
</tr>
<tr>
<td><span class="inline">xorigin</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td>
<td>The X coordinate of the particle system asset&#39;s origin. This will be 0 when the function is called on an instance that wasn&#39;t created from an asset.</td>
</tr>
<tr>
<td><span class="inline">yorigin</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td>
<td>The Y coordinate of the particle system asset&#39;s origin. This will be 0 when the function is called on an instance that wasn&#39;t created from an asset.</td>
</tr>
<tr>
<td><span class="inline">xdraw</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td>
<td>The X coordinate of the draw position for a particle system instance (see <span class="inline3_func"><a data-xref="{title}" href="Particle_Systems/part_system_position.htm">part_system_position</a></span>). This will be 0 when the function is called on an asset.</td>
</tr>
<tr>
<td><span class="inline">ydraw</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td>
<td>The Y coordinate of the draw position for a particle system instance (see <span class="inline3_func"><a data-xref="{title}" href="Particle_Systems/part_system_position.htm">part_system_position</a></span>). This will be 0 when the function is called on an asset.</td>
</tr>
<tr>
<td><span class="inline">angle</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Real</a></span></td>
<td>The angle of the particle system instance (see <span class="inline3_func"><a data-xref="{title}" href="Particle_Systems/part_system_angle.htm">part_system_angle</a></span>).</td>
</tr>
<tr>
<td><span class="inline">color</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td><span data-keyref="Type_Constant_Colour"><a target="_blank" href="../Colour_And_Alpha/Colour_And_Alpha.htm">Colour</a></span></td>
<td>The blend colour of the particle system instance (see <span class="inline3_func"><a data-xref="{title}" href="Particle_Systems/part_system_colour.htm">part_system_colour</a></span>).</td>
</tr>
<tr>
<td><span class="inline">global_space</span></td>
<td><span data-keyref="Type_Bool"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Boolean</a></span></td>
<td><span data-keyref="Type_Bool"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Boolean</a></span></td>
<td>Whether this particle system has global space particles enabled (see <span class="inline3_func"><a data-xref="{title}" href="Particle_Systems/part_system_global_space.htm">part_system_global_space</a></span>).</td>
</tr>
<tr>
<td><span class="inline">oldtonew</span></td>
<td><span data-keyref="Type_Bool"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Boolean</a></span></td>
<td><span data-keyref="Type_Bool"><a target="_blank" href="../../../GML_Overview/Data_Types.htm">Boolean</a></span></td>
<td>Whether old particles should be drawn behind new ones (<span class="inline2">true</span>) or not (<span class="inline2">false</span>).</td>
</tr>
<tr>
<td><span class="inline">emitters</span></td>
<td><span data-keyref="Type_Array"><a href="../../../GML_Overview/Arrays.htm" target="_blank">Array</a></span> of <span data-keyref="Type_Struct_PartEmitter_Info"><a href="particle_get_info.htm#particle_emitter_info_struct" target="_blank">Particle Emitter Info Struct</a></span></td>
<td><span data-keyref="Type_Array"><a target="_blank" href="../../../GML_Overview/Arrays.htm">Array</a></span> of <span data-keyref="Type_Struct_PartEmitter_Info"><a target="_blank" href="particle_get_info.htm#particle_emitter_info_struct">Particle Emitter Info Struct</a></span></td>
<td>An array of emitter info structs, ordered the same as in <a data-xref="{title}" href="../../../../The_Asset_Editors/Particle_Systems.htm">The Particle System Editor</a>.</td>
</tr>
</tbody>
Expand Down Expand Up @@ -455,20 +455,48 @@ <h1><span data-field="title" data-format="default">particle_get_info</span></h1>
<tr>
<th colspan="3">Color &amp; Alpha</th>
</tr>
<tr>
<td><span class="inline">color_mode</span></td>
<td><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The color mode of the particle type. Can be one of these values:<br />
<br />
0: Uses only one colour (<span class="inline">color1</span>)<br />
1: Interpolates between two colours over time (<span class="inline">color1</span>, <span class="inline">color2</span>)<br />
2: Interpolates between three colours over time (<span class="inline">color1</span>-<span class="inline">3</span>)<br />
3: Uses RGB range values (<span class="inline">color1</span>-<span class="inline">6</span> represent the parameters in order)<br />
4: Uses HSV range values (<span class="inline">color1</span>-<span class="inline">6</span> represent the parameters in order)<br />
5: Mixes two colours (<span class="inline">color1</span>, <span class="inline">color2</span>)
</td>
</tr>
<tr>
<td><span class="inline">color1</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>The color of the particle when created.</td>
<td>See <span class="inline">color_mode</span> description above for value</td>
</tr>
<tr>
<td><span class="inline">color2</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>The color of the particle when halfway through its lifespan.</td>
<td>See <span class="inline">color_mode</span> description above for value</td>
</tr>
<tr>
<td><span class="inline">color3</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>The color of the particle at the end of its lifespan.</td>
<td>See <span class="inline">color_mode</span> description above for value</td>
</tr>
<tr>
<td><span class="inline">color4</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>See <span class="inline">color_mode</span> description above for value (only used for RGB, HSV modes)</td>
</tr>
<tr>
<td><span class="inline">color5</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>See <span class="inline">color_mode</span> description above for value (only used for RGB, HSV modes)</td>
</tr>
<tr>
<td><span class="inline">color6</span></td>
<td><span data-keyref="Type_Constant_Colour"><a href="../Colour_And_Alpha/Colour_And_Alpha.htm" target="_blank">Colour</a></span></td>
<td>See <span class="inline">color_mode</span> description above for value (only used for RGB, HSV modes)</td>
</tr>
<tr>
<td><span class="inline">alpha1</span></td>
Expand Down Expand Up @@ -578,7 +606,7 @@ <h4>Example 2: Listing Emitter Names</h4>
<div>Next: <a data-xref="{title}" href="particle_add.htm">particle_add</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2026 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
particle_get_info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ <h1><span data-field="title" data-format="default">Flex Panel Struct Members</sp
<p>When creating a new <span data-keyref="FlexPanel">Flex Panel</span> node using <span class="inline3_func"><a data-xref="{title}" href="Function_Reference/flexpanel_create_node.htm">flexpanel_create_node</a></span>, you can pass a struct containing information on the node and its children, or a string containing JSON for the same data. For example:</p>
<div data-conref="../../../assets/snippets/Flex_Panel_example_create_node_with_struct.hts"> </div>
<p>This defines a root node with child nodes nested within it (and further child nodes within child nodes).</p>
<h2>UI Layer Properties</h2>
<p>The Flex Panel system is used for <a data-xref="{title}" href="../../../The_Asset_Editors/Room_Properties/UI_Layers.htm">UI Layers</a> in the Room Editor. For more visual documentation on the shared properties, see: <a data-xref="{title}" href="../../../The_Asset_Editors/Room_Properties/UI_Element_Propert.htm">UI Element Properties</a></p>
<h2>Property List</h2>
<p>The properties that you can define in the struct or JSON string are listed below. The rest of the page describes each property in detail.</p>
<p>Structs retrieved for nodes (e.g. <span class="inline3_func"><a data-xref="{title}" href="Function_Reference/flexpanel_node_get_child.htm">flexpanel_node_get_child</a></span> or <span class="inline3_func"><a data-xref="{title}" href="../Asset_Management/Rooms/UI_Layers/layer_get_flexpanel_node.htm">layer_get_flexpanel_node</a></span>) using <span class="inline3_func"><a data-xref="{title}" href="Function_Reference/flexpanel_node_get_struct.htm">flexpanel_node_get_struct</a></span> will include the same variables listed below.</p>
Expand Down Expand Up @@ -247,7 +249,7 @@ <h3>Layer Elements</h3>
<li>instanceObjectIndex (Object Handle)</li>
<li>instanceId (Instance Handle)</li>
<li>elementId (Element Handle): Element of the instance in the layer</li>
<li>instanceVariables (Struct): Contains the Variable Definitions set up for the object, with the variable name as the key and the variable value as the key value</li>
<li>instanceVariables (Struct): Contains the Variable Definitions set up for the object, with the variable name as the key and the variable value as the key value. (<span data-conref="../../../assets/snippets/Tag_note.hts"> </span> You cannot set read-only variables or the depth as it is controlled by the layer.)</li>
<li>instanceOffsetX, instanceOffsetY, instanceScaleX, instanceScaleY, instanceAngle, instanceImageSpeed, instanceImageIndex (Real)</li>
<li>instanceColour (Colour)</li>
</ul>
Expand Down Expand Up @@ -294,7 +296,7 @@ <h3>Clip Content</h3>
<div>Next: <a data-xref="{title}" href="Function_Reference/section_index.htm">Flex Panel Functions</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2026 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
Flex_Panels_Styling
Expand Down
Loading