Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024.6 #136

Merged
merged 156 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
b990c87
docs(feature): Add an option to specify "step" in the ImGUI slider co…
YYBartT Apr 30, 2024
ca2f907
docs(general): document OS and audio device limitations when using audio
YYBartT May 1, 2024
1bfb050
docs(feature): Switch to the docking branch of imgui
YYBartT May 1, 2024
42a09e9
docs(feature): documented the new dbg_text_separator function
YYBartT May 1, 2024
ca6c2ac
Merge branch 'develop.bart-4905-imgui-docking-branch' into develop.bart
YYBartT May 1, 2024
e59e050
Merge branch 'develop.bart-4998-dbg_text_eparator' into develop.bart
YYBartT May 1, 2024
e5a3de6
docs(feature): smaller custom format screenshot
YYBartT May 2, 2024
357ebe6
docs(general): mentioned that any attached files are uploaded privately
YYBartT May 2, 2024
3f97efa
docs(feature):
YYBartT May 2, 2024
cff7088
docs(feature): documented dbg_view_exists and dbg_section_exists
YYBartT May 2, 2024
5a93e56
Merge branch 'develop.bart-temp' into develop.bart
YYBartT May 2, 2024
5df7eee
docs(feature): documented dbg_view_exists and dbg_section_exists
YYBartT May 2, 2024
0ea2c88
docs(feature): skeleton_animation_clear optional parameters
YYBartT May 3, 2024
fa80a63
docs(feature): documented gamepad_enumerate
YYBartT May 3, 2024
fa8f843
docs(general): sprite_create_from_surface w / h must be >0
gurpreetsinghmatharoo May 6, 2024
333193e
docs(general): Surface warning
gurpreetsinghmatharoo May 7, 2024
ee02bd9
docs(general): Document that changing sprite_index to a shorter anima…
gurpreetsinghmatharoo May 7, 2024
edceb9b
docs(general): Clarification for iOS file handling of files with the …
gurpreetsinghmatharoo May 7, 2024
177c5d8
docs(general): Built-In Lights need Vertex Buffers to work
gurpreetsinghmatharoo May 7, 2024
c9eb354
docs(general): Clarify description on ds_map_add() to make the differ…
gurpreetsinghmatharoo May 7, 2024
6f43bd6
docs(general): Manual Content: Update macOS section of Gamepad Input …
gurpreetsinghmatharoo May 7, 2024
3067cbd
docs(general): draw_light_get element 5 fix
gurpreetsinghmatharoo May 7, 2024
8b04576
docs(feature): Specify that tile collisions require the tile map to h…
gurpreetsinghmatharoo May 7, 2024
45be0af
docs(general): Various manual fixes
gurpreetsinghmatharoo May 7, 2024
46f6af7
docs(feature): Snippets: The format shown in the manual causes an old…
gurpreetsinghmatharoo May 8, 2024
128a3f8
docs(feature): layer_force_draw_depth takes precedence over gpu_set_d…
gurpreetsinghmatharoo May 8, 2024
43e7aa1
docs(feature): Behaviour of collision_line and collision_point
gurpreetsinghmatharoo May 8, 2024
9f280cd
docs(general): Compiler batch scripts update
gurpreetsinghmatharoo May 8, 2024
254656f
docs(feature): added documentation for physics_raycast
YYBartT May 8, 2024
a927e31
Merge branch 'develop.bart-2762-box2d-raycasts' into develop.bart
YYBartT May 8, 2024
a4bc152
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo May 9, 2024
e22cb82
docs(general): audio stream length on gx and html5
gurpreetsinghmatharoo May 9, 2024
aa2eb1c
Merge branch 'develop.bart' into develop.gurpreet
gurpreetsinghmatharoo May 9, 2024
31b483d
docs(feature): dbg_slider step
gurpreetsinghmatharoo May 9, 2024
0024e5c
docs(feature): dbg array functionality
gurpreetsinghmatharoo May 9, 2024
050cf21
docs(feature): Updated behaviour of collision_line() and collision_po…
gurpreetsinghmatharoo May 13, 2024
b897b42
docs(general): Collision functions don't floor x/y
gurpreetsinghmatharoo May 13, 2024
229eff2
docs(general): The self scope of a moment function is the sequence in…
gurpreetsinghmatharoo May 13, 2024
e46e10d
docs(general): clipboard_*_text() page needs further clarification th…
gurpreetsinghmatharoo May 13, 2024
78e04f6
docs(feature): struct_exists_from_hash() and struct_remove_from_hash()
YYBartT May 15, 2024
b104ac9
docs(general): gpu_set_texrepeat_ext example typo fix
gurpreetsinghmatharoo May 16, 2024
2ababf2
docs(feature): documented gpu_get_sprite_cull & gpu_set_sprite_cull
YYBartT May 16, 2024
1bd0da4
docs(feature): documented the new compiler optimisations (functions, …
YYBartT May 17, 2024
567c971
docs(feature): text in rooms IDE side
gurpreetsinghmatharoo May 18, 2024
00f7463
docs(feature): created placeholder pages for main text element functions
gurpreetsinghmatharoo May 18, 2024
6d2aa18
docs(feature): Created placeholder pages for text element setters
gurpreetsinghmatharoo May 18, 2024
90eac7b
docs(feature): Created placeholder pages for text element getter func…
gurpreetsinghmatharoo May 18, 2024
40eee37
docs(feature): Added Text Element functions to ToC
gurpreetsinghmatharoo May 20, 2024
1dfb6cf
docs(feature): Text in rooms image
gurpreetsinghmatharoo May 20, 2024
cf9cbc1
docs(feature): Finished documenting main Text Element functions (crea…
gurpreetsinghmatharoo May 20, 2024
bbd4c5f
docs(feature): documented the falloff parameters in the Sequence Editor
YYBartT May 20, 2024
5fc13a3
docs(feature): documented the new compiler optimisations (functions, …
YYBartT May 20, 2024
98c0a95
Update build_robohelp_gh.bat
gurpreetsinghmatharoo May 21, 2024
a833b0e
Merge pull request #122 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo May 21, 2024
3045db9
docs(feature): Finish basic documentation for text element setter fun…
gurpreetsinghmatharoo May 21, 2024
3c232a1
docs(feature): Finish basic documentation for text element getter fun…
gurpreetsinghmatharoo May 21, 2024
2811045
Merge branch 'develop' into develop.bart
gurpreetsinghmatharoo May 22, 2024
d6e3e04
Merge pull request #123 from YoYoGames/develop.bart
gurpreetsinghmatharoo May 22, 2024
9ff4174
docs(feature): Review PR #123
gurpreetsinghmatharoo May 22, 2024
61450f3
Merge pull request #126 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo May 22, 2024
c0c8c15
docs(feature): Replaced sequence seqtextkey_ constants with new texta…
gurpreetsinghmatharoo May 22, 2024
bb64724
docs(feature): compiler optimisations (changes after PR review)
YYBartT May 22, 2024
55bec24
docs(feature): documented the falloff parameters in the Sequence Edit…
YYBartT May 22, 2024
96dec1e
docs(feature): documented the falloff parameters in the Sequence Edit…
YYBartT May 22, 2024
6da5c24
docs(feature): Add a "step size" argument to dbg_slider() and dbg_sli…
YYBartT May 22, 2024
5b213e2
docs(feature): finish examples for all text element functions
gurpreetsinghmatharoo May 23, 2024
bea5aae
docs(feature): minor fixes for Text Element pages
gurpreetsinghmatharoo May 23, 2024
943ef50
docs(feature): Mention text under Layer Toolbox
gurpreetsinghmatharoo May 23, 2024
fef392e
docs(feature): Improve text in sequences note
gurpreetsinghmatharoo May 23, 2024
db41c4c
Merge branch 'develop.gurpreet' into develop.gurpreet.text-in-rooms
gurpreetsinghmatharoo May 23, 2024
f781f91
docs(general): Fixed example code on layer_sprite_exists and layer_sp…
gurpreetsinghmatharoo May 27, 2024
d5ca8dd
docs(general): Fixed audio_3D -> audio_3d
gurpreetsinghmatharoo May 28, 2024
77baaca
docs(feature): depth and stencil buffer - added function pages using …
YYBartT May 28, 2024
1d5a959
docs(general): buffer_peek() page incorrectly says it returns 0 when …
YYBartT May 28, 2024
dea0ec7
docs(general): Add to gml.js: asset_sequence, asset_animationcurve, a…
gurpreetsinghmatharoo May 29, 2024
aa24495
docs(feature): Documented that you can select alignment in sequence t…
gurpreetsinghmatharoo May 29, 2024
b2b9bea
docs(general): Do / Until example uses instance_count instead of inst…
YYBartT May 29, 2024
11a3bf3
docs(feature): Text in Rooms fixes after review
gurpreetsinghmatharoo May 29, 2024
91501cc
Merge pull request #127 from YoYoGames/develop.gurpreet.text-in-rooms
gurpreetsinghmatharoo May 29, 2024
5db5af6
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo May 29, 2024
7889f05
docs(general): Typo fix in examples on gpu_set/get_tex_mip_enable
gurpreetsinghmatharoo Jun 3, 2024
9c4a337
docs(feature): gpu_set_sprite_cull page improvements
YYBartT Jun 4, 2024
c3edd0c
docs(feature): Documented the new Element List in Room Editors
gurpreetsinghmatharoo Jun 5, 2024
cbee9bb
docs(general): Improved QS guide on Events
gurpreetsinghmatharoo Jun 5, 2024
bbc64f5
docs(feature): Documented new function audio_sound_get_asset()
gurpreetsinghmatharoo Jun 6, 2024
7b396be
docs(general): Fixed outdated example on surface_copy_part
gurpreetsinghmatharoo Jun 6, 2024
cb1121e
docs(feature): Documented enabling/disable IMEs on Windows
gurpreetsinghmatharoo Jun 6, 2024
2d7badf
docs(feature): bboxkind_spine and support for changing collision mask…
gurpreetsinghmatharoo Jun 6, 2024
c074e19
Merge pull request #130 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Jun 6, 2024
5e47982
docs(feature): physics_raycast new instance entry
gurpreetsinghmatharoo Jun 7, 2024
3dbb27c
docs(general): Changed references to variable_struct_* functions stru…
gurpreetsinghmatharoo Jun 7, 2024
fbb756f
docs(general): tilemap_set_at_pixel title fix
gurpreetsinghmatharoo Jun 7, 2024
aaf4bb6
docs(general): changed gpu_set_colourwriteenable spelling for consist…
YYBartT Jun 7, 2024
609defd
docs(feature): gpu_set_sprite_cull page improvements
YYBartT Jun 4, 2024
c2e300a
docs(feature): gpu_set_sprite_cull image size fix
gurpreetsinghmatharoo Jun 7, 2024
f95a1b7
Merge pull request #131 from YoYoGames/develop.bart
gurpreetsinghmatharoo Jun 7, 2024
d415a33
docs(general): Conditionals spelling error
gurpreetsinghmatharoo Jun 7, 2024
f96a6b3
docs(general): Document sprite_delete return value
gurpreetsinghmatharoo Jun 10, 2024
3877e1e
docs(general): Update manual to outline that Sequences are the replac…
gurpreetsinghmatharoo Jun 10, 2024
efde36c
docs(general): Memory Management with Sockets Unclear + Note on netwo…
gurpreetsinghmatharoo Jun 10, 2024
a9d0fa0
docs(general): gif_add_surface() syntax box fix
gurpreetsinghmatharoo Jun 10, 2024
46e6253
docs(general): Add a "Mac/Linux cleaning while on PC" example in "Bui…
gurpreetsinghmatharoo Jun 10, 2024
3a14db1
docs(general): fixed missing parentheses around function call on gpu_…
YYBartT Jun 11, 2024
2c2fe0a
docs(feature): depth & stencil buffer - added buffer_get_surface_dept…
YYBartT Jun 13, 2024
d6fc042
docs(feature): updated description of surface_create
YYBartT Jun 13, 2024
18c4e66
docs(general): replaced hyperlinks with cross-references on Drawing o…
YYBartT Jun 13, 2024
62e6a69
docs(feature): depth & stencil buffer - new draw_clear_* function pages
YYBartT Jun 13, 2024
0b29e73
docs(feature): depth & stencil buffer
YYBartT Jun 16, 2024
f3b51c1
docs(feature): depth & stencil buffer
YYBartT Jun 16, 2024
9a04998
docs(feature): depth & stencil buffer - surface_get_target_depth func…
YYBartT Jun 16, 2024
5e13b2c
docs(feature): depth & stencil buffer - added new RH variables
YYBartT Jun 16, 2024
22e5f5b
docs(feature): depth & stencil buffer - updated back & next links
YYBartT Jun 16, 2024
6010357
docs(feature): depth & stencil buffer - listed new draw_clear_* funct…
YYBartT Jun 16, 2024
5223979
docs(feature): depth & stencil buffer - minor changes to buffer_set_s…
YYBartT Jun 16, 2024
1b8732e
docs(feature): depth & stencil buffer - fixed gpu_get_colourwriteenab…
YYBartT Jun 16, 2024
3d8e0da
docs(feature): depth & stencil buffer - changes to Surfaces overview …
YYBartT Jun 16, 2024
52d6999
docs(feature): depth & stencil buffer - updated surface_set_target fu…
YYBartT Jun 16, 2024
16d857c
docs(feature): depth & stencil buffer - gpu_get_stencil_* & gpu_set_s…
YYBartT Jun 16, 2024
52613fe
docs(feature): depth & stencil buffer
YYBartT Jun 17, 2024
2c60c50
docs(feature): depth & stencil buffer - surface_depth_disable & surfa…
YYBartT Jun 17, 2024
c10d62e
docs(feature): depth & stencil buffer - surface_depth_disable & surfa…
YYBartT Jun 17, 2024
94f3e42
docs(feature): depth & stencil buffer - surface_depth_disable & surfa…
YYBartT Jun 17, 2024
9a87ae3
docs(feature): depth & stencil buffer - surface_depth_disable & surfa…
YYBartT Jun 17, 2024
82166ea
docs(feature): depth & stencil buffer - surface_depth_disable & surfa…
YYBartT Jun 17, 2024
280687e
docs(feature): depth & stencil buffer
YYBartT Jun 17, 2024
e4b321e
Merge branch 'develop.bart-3708-depth-stencil-buffer' into develop.bart
YYBartT Jun 17, 2024
e576c99
Merge branch 'develop.bart.temp' into develop.bart
YYBartT Jun 17, 2024
1d534b8
docs(general): cursor_sprite - manual page doesn't open
YYBartT Jun 18, 2024
0e8e282
docs(feature): depth & stencil buffer
YYBartT Jun 18, 2024
f617f0c
docs(feature): depth & stencil buffer - surface_get_texture_depth
YYBartT Jun 19, 2024
f6049fb
docs(general): shader_set_uniform_matrix & shader_set_uniform_matrix_…
YYBartT Jun 20, 2024
890106a
docs(general): array_first/array_last will return "undefined" if the …
YYBartT Jun 20, 2024
273e25d
docs(general): ds_list_set() page has an incorrect explanation for it…
YYBartT Jun 20, 2024
faef5aa
docs(feature): depth & stencil buffer - documented contents of gpu_ge…
YYBartT Jun 21, 2024
6900952
docs(general): Error in "layer_get_name" example
YYBartT Jun 21, 2024
54babb2
docs(feature): gpu_set_sprite_cull() is not applied to tilemaps drawn…
YYBartT Jun 21, 2024
1a52177
docs(general): Redefine Keys: Refactor the menu so it does not refres…
YYBartT Jun 21, 2024
6fdbe15
docs(general): Add a link for reporting "Security Issues" to the info…
YYBartT Jun 24, 2024
fe3cb60
docs(feature): depth / stencil buffers review
gurpreetsinghmatharoo Jun 25, 2024
5322053
Merge pull request #132 from YoYoGames/develop.bart
gurpreetsinghmatharoo Jun 25, 2024
c94d06a
Merge pull request #133 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Jun 25, 2024
07c6dd7
docs(general): gml_pragma("forceinline" does not work on methods
YYBartT Jun 25, 2024
e68dc2e
docs(general): gml_pragma("forceinline" does not work on methods
YYBartT Jun 25, 2024
214b263
docs(feature): depth and stencil buffer
YYBartT Jun 25, 2024
bbe06a2
docs(feature): Shift cannot be used as solo modifier for hotkey chords
gurpreetsinghmatharoo Jun 25, 2024
f61c863
Merge branch 'develop' into develop.bart
YYBartT Jun 25, 2024
877040a
docs(general): Shader issues with certain new Android devices
YYBartT Jun 25, 2024
690c7c0
docs(general): [Documentation] Guarantee Collision Events in Event Order
YYBartT Jun 26, 2024
d45c251
docs(feature): sprite_cull is enabled by default
gurpreetsinghmatharoo Jun 27, 2024
8a8958b
docs(general): sprite_get_info().frame_info is undefined if sprite ha…
gurpreetsinghmatharoo Jun 27, 2024
b8d7c4d
docs(general): Various dev/debug async dialog pages state it shouldn'…
YYBartT Jun 27, 2024
a5ce06d
docs(general): Bug reported related fixes
gurpreetsinghmatharoo Jun 27, 2024
233600b
docs(general): .NET8 has changed where user settings are stored, we s…
YYBartT Jun 28, 2024
89ab35b
docs(feature): PR #134 fix
gurpreetsinghmatharoo Jul 1, 2024
4170109
Merge pull request #134 from YoYoGames/develop.bart
gurpreetsinghmatharoo Jul 1, 2024
f5fec37
Merge pull request #135 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Manual/_page_generation/Template_Code_Page.htm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1><span data-field="title" data-format="default">INSERT_TITLE</span></h1>
<p>Additional Information Goes Here.</p>
<p> </p>
<h4>Syntax:</h4>
<p class="code">keyword_name(arguments);</p>
<p class="code"><span data-field="title" data-format="default"></span>(arguments);</p>
<table>
<colgroup>
<col />
Expand Down
4 changes: 2 additions & 2 deletions Manual/contents/GameMaker_Language/GML_Overview/Accessors.htm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h1><span data-field="title" data-format="default">Accessors</span></h1>
<div class="droptext" data-targetname="drop-down16">
<p class="dropspot"><span>The struct accessor uses the <span class="inline2"><a id="$"></a>$</span> sign as the identifier symbol. This makes the accessor syntax for <a href="Structs.htm">structs</a>: </span></p>
<p class="code">struct[$ &quot;name&quot;]</p>
<p class="dropspot">This accessor is essentially a wrapper for the functions <span><a href="../GML_Reference/Variable_Functions/variable_struct_get.htm"><span class="inline2">variable_struct_get()</span></a> and <a href="../GML_Reference/Variable_Functions/variable_struct_set.htm"><span class="inline2">variable_struct_set()</span></a>, and <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_global_get.htm">variable_global_get</a></span> and <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_global_set.htm">variable_global_set</a></span> if you access <a data-xref="{text}" href="Variables/Global_Variables.htm#the_global_struct">The Global Struct</a> using the <span class="inline2">global</span> keyword.</span></p>
<p class="dropspot">This accessor is essentially a wrapper for the functions <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_struct_get.htm">struct_get</a></span><span> and <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_struct_set.htm">struct_set</a></span>, and <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_global_get.htm">variable_global_get</a></span> and <span class="inline3_func"><a data-xref="{title}" href="../GML_Reference/Variable_Functions/variable_global_set.htm">variable_global_set</a></span> if you access <a data-xref="{text}" href="Variables/Global_Variables.htm#the_global_struct">The Global Struct</a> using the <span class="inline2">global</span> keyword.</span></p>
<p class="dropspot"><span>You would use it much like the accessor for a DS map. For example, if you have created a struct and want to retrieve a value from a variable called &quot;my_health&quot; then you&#39;d do:</span></p>
<p class="code">var _hp = struct[$ &quot;my_health&quot;];</p>
<p class="dropspot">As you can see, you don&#39;t supply the variable itself, but rather a <em>string</em> with the variable&#39;s name.</p>
Expand Down Expand Up @@ -178,7 +178,7 @@ <h1><span data-field="title" data-format="default">Accessors</span></h1>
<div style="float:right">Next: <a data-xref="{title}" href="Language_Features.htm">Language Features</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h2>Grouping Expressions &amp; Statements</h2>
    variable = true;<br />
}
</p>
<p>Note that while this is slightly more verbose, it means that there is no ambiguity in the code and that it will compile correctly on ail platforms at all times. However, the initial example may not, as explained on the section in the <a href="../Expressions_And_Operators.htm">Expressions And Operators</a> page.</p>
<p>Note that while this is slightly more verbose, it means that there is no ambiguity in the code and that it will compile correctly on all platforms at all times. However, the initial example may not, as explained on the section in the <a href="../Expressions_And_Operators.htm">Expressions And Operators</a> page.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> When comparing two values to see if they are equal, you should use the &quot;<span class="inline">==</span>&quot; operator, and only use the &quot;<span class="inline">=</span>&quot; one for assignment. Currently GameMaker will treat them as interchangeable, but this may change in the future and your code is cleaner and more obvious when using the correct operators for comparisons and assignments.</p>
<p>To give a proper example of using <span class="inline">if</span>, consider the following code which will move an instance towards the position <span class="inline">x=200</span> in the room when placed in the Step Event:</p>
<p class="code">if (x &lt; 200)<br />
Expand All @@ -89,7 +89,7 @@ <h2>Compound Checks</h2>
<p>Here we are checking using the <span class="inline">&amp;&amp;</span> &quot;and&quot; operator, so it&#39;s checking if <em>both </em>of the conditions in the <span class="inline">if</span> evaluate to <span class="inline">true</span>, and if the first one is <span class="inline">false</span> then the second one won&#39;t even be checked.</p>
<p>This is called &quot;short circuiting&quot; the code, so when combining expressions to check, you should ensure that the &quot;cheapest&quot; one for performance is always the first to avoid evaluating the more expensive ones if the first evaluates to <span class="inline">false</span>.</p>
<p>In a similar vein, if a condition will can be evaluated as <span class="inline">true</span> or <span class="inline">false</span> at compile time, then the entire condition will be removed from the code, for example, say you have a <a href="../Variables/Constants.htm">macro</a> <span class="inline">DEBUG_ON</span> for debugging and it can be either <span class="inline">true</span> or <span class="inline">false</span> - when it is set to <span class="inline">false</span> then the following code block will be stripped from the game when it is compiled:</p>
<p class="code">if (DEBUG_ON == true) <br />
<p class="code">if (DEBUG_ON == true)<br />
{<br />
    show_debug_message(&quot;Instances = &quot; + string(instance_count));<br />
}</p>
Expand All @@ -115,7 +115,7 @@ <h2>Ternary Operators</h2>
<div style="float:right">Next: <a data-xref="{title}" href="../Addressing_Variables_In_Other_Instances.htm">Addressing Variables In Other Instances</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>do / until</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../assets/css/default.css" type="text/css" />
<script src="../../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Mark Alexander" />
<meta name="topic-comment" content="Page outlining the do / until functions" />
<meta name="topic-comment" content="Page outlining the do / until loop" />
<meta name="rh-index-keywords" content="do,until" />
<meta name="search-keywords" content="do,until" />
</head>
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1>do / until</h1>
<p>A <span class="inline">do</span> function is another way of iterating over one or more <a class="glossterm" data-glossterm="statement" href="#">statement</a><span class="glossextra">s</span> multiple times, and is really a &quot;<span class="inline">do... until</span>&quot; statement as you cannot have one without the other since you are telling <span data-keyref="GameMaker Name">GameMaker</span> to do something until a specific <a class="glossterm" data-glossterm="expression" href="#">expression</a> returns <span class="inline">true</span>. It has this form:</p>
<h1><span data-field="title" data-format="default">do / until</span></h1>
<p>A <span class="inline">do</span> statement is another way of iterating over one or more <a class="glossterm" data-glossterm="statement" href="#">statement</a><span class="glossextra">s</span> multiple times, and is really a &quot;<span class="inline">do... until</span>&quot; statement as you cannot have one without the other since you are telling <span data-keyref="GameMaker Name">GameMaker</span> to do something until a specific <a class="glossterm" data-glossterm="expression" href="#">expression</a> returns <span class="inline">true</span>. It has this form:</p>
<p class="code">do<br />
{<br />
    &lt;statement&gt;;<br />
Expand All @@ -30,16 +30,16 @@ <h1>do / until</h1>
    y = random(room_height);<br />
}<br />
until (place_free(x, y));</p>
<p>The above code tries to place the current object at a free position and will set the x/y variables at least once, and then perform as many <a class="glossterm" data-glossterm="iteration" href="#">iteration</a><span class="glossextra">s</span> as required until the <span class="inline">place_free()</span> expression returns <span class="inline">true</span>.</p>
<p>The above code tries to place the current object at a free position and will set the x and y variables at least once, and then perform as many <a class="glossterm" data-glossterm="iteration" href="#">iteration</a><span class="glossextra">s</span> as required until the <span class="inline">place_free()</span> expression returns <span class="inline">true</span>.</p>
<p><strong>When should you use a <span class="inline">do</span> / <span class="inline">until</span> loop?</strong> It should be used any time you want to repeat one or more statements, but don&#39;t actually know how many times it has to repeat, and want to ensure that the statements are run <em>at least once</em> before the loop ends.</p>
<p>You can also use the <a href="break.htm"><span class="inline">break</span></a> and <a href="continue.htm"><span class="inline">continue</span></a> statements within your <span class="inline">do</span> loops. Using <span class="inline">break</span> will immediately exit the loop and move on to any code that is in the event or function after the loop should have finished, eg:</p>
<p>You can also use the <a href="break.htm"><span class="inline">break</span></a> and <a href="continue.htm"><span class="inline">continue</span></a> statements within your <span class="inline">do</span> loops. Using <span class="inline">break</span> will immediately exit the loop and move on to any code that is in the event or function after the loop should have finished, e.g.:</p>
<p class="code">var _id = noone;<br />
do<br />
{<br />
    _id = list[| 0];<br />
    if (instance_exists(_id)) <br />
    if (instance_exists(_id))<br />
    {<br />
        _break;<br />
        break;<br />
    }<br />
    ds_list_delete(list, 0);<br />
}<br />
Expand All @@ -59,7 +59,7 @@ <h1>do / until</h1>
    }<br />
    instance_create_layer(_x, _y, &quot;Instances&quot;, obj_Enemy);<br />
}<br />
until (instance_count(obj_Enemy) &gt;= 10);</p>
until (instance_number(obj_Enemy) &gt;= 10);</p>
<p>This code will generate a random room position then check if an instance of the object <span class="inline">obj_Enemy</span> exists at that position. If it does, the current loop iteration is terminated using <span class="inline">continue</span> and a new iteration is started, and if it doesn&#39;t then an instance of the object <span class="inline">obj_Enemy</span> is created at the random position. The loop will only terminate when there are 10 or more instances of the object in the room.</p>
<p>One final note: be careful with your <span class="inline">do</span> loops, as you can easily make them loop forever, in which case your game will hang and not react to any user input anymore and they will have to force close it.</p>
<p>For more examples of loop keywords please see the sections on <a href="repeat.htm"><span class="inline">repeat</span></a>, <a href="while.htm"><span class="inline">while</span></a>, and <a href="for.htm"><span class="inline">for</span></a>.</p>
Expand All @@ -73,7 +73,7 @@ <h1>do / until</h1>
<div style="float:right">Next: <a href="for.htm">for</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2021 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ <h3>Asset Info</h3>
<li><a data-xref="{title}" href="audio_exists.htm">audio_exists</a></li>
<li><a data-xref="{title}" href="audio_get_name.htm">audio_get_name</a></li>
<li><a data-xref="{title}" href="audio_get_type.htm">audio_get_type</a></li>
<li><a data-xref="{title}" href="audio_sound_get_asset.htm">audio_sound_get_asset</a></li>
<li><a data-xref="{title}" href="audio_sound_length.htm">audio_sound_length</a></li>
<li><a data-xref="{title}" href="audio_sound_is_playable.htm">audio_sound_is_playable</a></li>
</ul>
Expand Down Expand Up @@ -175,7 +176,7 @@ <h3>Advanced Audio</h3>
<div style="float:right">Next: <a data-xref="{title}" href="../Paths/Paths.htm">Paths</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
Audio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>audio_create_buffer_sound</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../../assets/css/default.css" type="text/css" />
<script src="../../../../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Mark Alexander" />
<meta name="topic-comment" content="Page explaining the function audio_create_buffer_sound" />
<meta name="rh-index-keywords" content="audio_create_buffer_sound" />
<meta name="search-keywords" content="audio_create_buffer_sound,audio_mono,audio_stereo,audio_3D" />
<meta name="search-keywords" content="audio_create_buffer_sound,audio_mono,audio_stereo,audio_3d" />
<meta name="is_pure" content="true" />
</head>
<body>
Expand All @@ -27,7 +27,7 @@ <h1>audio_create_buffer_sound</h1>
</colgroup>
<tbody>
<tr>
<th colspan="2"><span data-keyref="Type_Constant_Audio_Channel_Type"><a href="../../../../../../GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/audio_create_buffer_sound.htm" target="_blank">Audio Channel Constant</a></span></th>
<th colspan="2"><span data-keyref="Type_Constant_Audio_Channel_Type"><a href="audio_create_buffer_sound.htm" target="_blank">Audio Channel Constant</a></span></th>
</tr>
<tr>
<th>Constant</th>
Expand All @@ -42,7 +42,7 @@ <h1>audio_create_buffer_sound</h1>
<td>Stereo (dual channel) audio</td>
</tr>
<tr>
<td><span class="inline">audio_3D</span></td>
<td><span class="inline">audio_3d</span></td>
<td>3D (5.1) audio</td>
</tr>
</tbody>
Expand All @@ -62,39 +62,39 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>bufferId</td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer ID</a></span></td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../Buffers/buffer_create.htm" target="_blank">Buffer</a></span></td>
<td>The ID of the buffer to use.</td>
</tr>
<tr>
<td>bufferFormat</td>
<td><span data-keyref="Type_Constant_Buffer_Data_Type"><a href="../../../../../../GameMaker_Language/GML_Reference/Buffers/buffer_write.htm" target="_blank">Buffer Data Type Constant</a></span></td>
<td><span data-keyref="Type_Constant_Buffer_Data_Type"><a href="../../../Buffers/buffer_write.htm" target="_blank">Buffer Data Type Constant</a></span></td>
<td>The format of the data in the buffer (<span class="inline">buffer_u8</span> or <span class="inline">buffer_s16</span>).</td>
</tr>
<tr>
<td>bufferRate</td>
<td><span data-keyref="Type_Real"><a href="../../../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The sample rate of the data in the buffer.</td>
</tr>
<tr>
<td>bufferOffset</td>
<td><span data-keyref="Type_Real"><a href="../../../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The offset into the buffer to read the sample data from (in bytes).</td>
</tr>
<tr>
<td>bufferLength</td>
<td><span data-keyref="Type_Real"><a href="../../../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The length of the buffer (the number of bytes of audio data, excluding the header).</td>
</tr>
<tr>
<td>bufferChannels</td>
<td><span data-keyref="Type_Constant_Audio_Channel_Type"><a href="../../../../../../GameMaker_Language/GML_Reference/Asset_Management/Audio/Audio_Buffers/audio_create_buffer_sound.htm" target="_blank">Audio Channel Constant</a></span></td>
<td><span data-keyref="Type_Constant_Audio_Channel_Type"><a href="audio_create_buffer_sound.htm" target="_blank">Audio Channel Constant</a></span></td>
<td>The channels to use from one of the constants listed above.</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Asset_Sound"><a href="../../../../../../The_Asset_Editors/Sounds.htm" target="_blank">Sound Asset</a></span></p>
<p class="code"><span data-keyref="Type_Asset_Sound"><a href="../../../../../The_Asset_Editors/Sounds.htm" target="_blank">Sound Asset</a></span></p>
<p> </p>
<h4>Example:</h4>
<p class="code">var rate = 44100;<br />
Expand Down Expand Up @@ -130,13 +130,13 @@ <h4>Example:</h4>
<div style="float:right">Next: <a href="audio_free_buffer_sound.htm">audio_free_buffer_sound</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
audio_create_buffer_sound
audio_mono
audio_stereo
audio_3D
audio_3d
-->
<!-- TAGS
audio_create_buffer_sound
Expand Down
Loading
Loading