Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 21, 2025
2 parents 64c782e + 94ae533 commit 153e3b7
Show file tree
Hide file tree
Showing 79 changed files with 362 additions and 149 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Expand Down Expand Up @@ -71,9 +71,13 @@ <h1>Construction du code du bloc d'action</h1>
</div>
<h5><span data-keyref="Copyright Notice">Copyright <span class="notranslate">YoYo Games Ltd.</span> 2021 Tous droits réservés</span></h5>
</div>
<!-- KEYWORDS
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2025 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
GML Visual Construction
--><!-- TAGS
-->
<!-- TAGS
drag_and_drop_construction
--></body>
-->
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Expand Down Expand Up @@ -108,5 +107,5 @@ <h5><span data-keyref="Copyright Notice">Copyright <span class="notranslate">YoY
<!-- TAGS
action_set_view_var
-->

</body></html>
</body>
</html>
19 changes: 10 additions & 9 deletions Manual/contents/GameMaker_Language/GML_Overview/Accessors.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ <h1>Accesseurs</h1>
<p class="code">list_index[| index]</p>
<p class="dropspot">Ainsi, lorsque vous avez utilisé <span class="inline">ds_list_create()</span> pour créer votre liste, vous utilisez l'index de la liste (que vous avez stocké dans une variable) pour la référencer, la valeur &quot;index&quot; étant la position dans la liste à définir ou à ajouter. Par exemple, le code suivant crée une liste et ajoute ensuite 10 entrées, en définissant chaque entrée comme un nombre aléatoire de 0 à 9 :</p>
<p class="code">ds = ds_list_create();<br />
var index = 0;<br />
var _index = 0;<br />
repeat(10)<br />
{<br />
    ds[| index++] = irandom(9);<br />
    ds[| _index++] = irandom(9);<br />
}</p>
<p class="dropspot">Notez que si vous utilisez une expression pour ajouter une référence à un index qui a déjà une valeur, la valeur précédente sera remplacée plutôt que d'avoir un autre index ajouté à la liste. Pour ajouter des entrées supplémentaires, vous devrez connaître la taille de ds_list et les ajouter à la fin. Il est également intéressant de noter que vous pouvez définir un index de liste qui est <i>plus grand</i> que la taille de la liste référencée, et ceci définira cette valeur, développant la liste en même temps et initialisant toutes les positions dans la liste jusqu'à l'index donné comme 0.</p>
<p class="dropspot">Une fois que vous avez créé votre structure de liste et que vous l'avez remplie de données, pour obtenir des valeurs à partir de la liste, il vous faut quelque chose du genre :</p>
Expand Down Expand Up @@ -56,15 +56,15 @@ <h1>Accesseurs</h1>
<p class="dropspot">Après avoir créé votre grille à l'aide de la fonction <span class="inline">ds_grid_create()</span>, vous utiliserez l'index de la grille que vous avez stocké dans une variable pour la référencer, les &quot;xpos&quot; et &quot;ypos&quot; étant la position dans la grille pour obtenir ou définir une valeur. Par exemple, le code suivant crée une grille, la remet à 0, puis y ajoute quelques entrées :</p>
<p class="code">ds = ds_grid_create();<br />
ds_grid_clear(ds, 0);<br />
var gw = ds_grid_width(ds) - 1;<br />
var gh = ds_grid_height(ds) - 1;<br />
var _gw = ds_grid_width(ds) - 1;<br />
var _gh = ds_grid_height(ds) - 1;<br />
repeat(10)<br />
{<br />
    var xx = irandom(gw);<br />
    var yy = irandom(gh);<br />
    if (ds[# xx, yy] == 0)<br />
    var _xx = irandom(_gw);<br />
    var _yy = irandom(_gh);<br />
    if (ds[# _xx, _yy] == 0)<br />
    {<br />
        ds[# xx, yy] = 1;<br />
        ds[# _xx, _yy] = 1;<br />
    }<br />
}</p>
<p class="dropspot">Une fois que vous avez créé votre structure de grille et que vous l'avez remplie de données, pour obtenir des valeurs à partir d'une position spécifique de la grille, il vous faudrait quelque chose du genre :</p>
Expand All @@ -84,7 +84,8 @@ <h1>Accesseurs</h1>
<p class="dropspot">La fonction elle-même aurait quelque chose comme ceci :</p>
<p class="code">function array_populate(_array)<br />
{<br />
    var a = _array; var i = 0; repeat(25)<br />
    var a = _array; var i = 0;<br />
    repeat(25)<br />
    {<br />
        i = irandom(99);<br />
        while (a[i] != 0)<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</head>
<body>
<h1><span data-field="title" data-format="default">all</span></h1>
<p>This keyword is used to tell <span data-keyref="GameMaker Name">GameMaker</span> that a function is to be applied, or to check, <strong>all active instances</strong> within a room (deactivated instances will not be checked or accessed). You <b>cannot</b> use <span class="inline2">all</span> to access or set variables in other instances using the point method (see <a href="../Addressing_Variables_In_Other_Instances.htm">here</a>), but you <strong>can </strong>use it when using <span class="inline2"><a data-xref="{title}" href="../Language_Features/with.htm">with</a></span>, for example:</p>
<p>This keyword is used to tell <span data-keyref="GameMaker Name">GameMaker</span> that a function is to be applied, or to check, <strong>all active instances</strong> within a room (deactivated instances will not be checked or accessed). You <b>cannot</b> use <span class="inline2">all</span> to access or set variables in other instances using the dot operator <span class="inline2">.</span> (see <a href="../Addressing_Variables_In_Other_Instances.htm">here</a>), but you <strong>can </strong>use it when using <span class="inline2"><a data-xref="{title}" href="../Language_Features/with.htm">with</a></span>, for example:</p>
<p class="code">with (all)<br />
{<br />
    speed = 0;<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ <h2 id="pass_by_value_and_pass_by_reference">Pass by Value and Pass by Reference
}<br />
<br />
var _val_orig = 48593;<br />
try_to_modify_value(_val, 75);<br />
try_to_modify_value(_val_orig, 75);<br />
show_debug_message(_val_orig);<br />
<br />
var _array_orig = [1, 2, 3];<br />
try_to_modify_array(_array, 100);<br />
try_to_modify_array(_array_orig, 100);<br />
show_debug_message(_array_orig);
</p>
<p>In the call to <span class="inline3_func">try_to_modify_value()</span>, the value stored in <span class="inline2">_val_orig</span> is assigned to the function parameter <span class="inline2">_value</span>. Since this value is 48593, i.e. of type <span data-keyref="Type_Real"><a href="Data_Types.htm" target="_blank">Real</a></span>, it is copied. The new value 75 is assigned to <span class="inline2">_value</span>, which goes &quot;out of scope&quot; after the function finishes. <span class="inline2">_val_orig</span> isn&#39;t changed at all and still holds the value 48593.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1>Variables locales</h1>
<p class="code">var num = instance_number(obj_Enemy);<br />
with (obj_Enemy)<br />
{<br />
    if num&gt;10 instance_destroy();<br />
    if (num &gt; 10) instance_destroy();<br />
}</p>
<p>Le code ci-dessus fonctionne parce que la variable déclarée <span class="inline">var</span> est locale à l'<i>événement</i> (ou à la fonction) dans lequel elle est contenue, pas à l'instance, ni au monde du jeu, et peut donc être utilisée dans n'importe quelle fonction de n'importe quel objet tant qu'elle se trouve dans le même bloc de code.</p>
<p> </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>Les retours :</h4>
<h4>Exemple :</h4>
<p class="code">var obj = asset_get_index(&quot;obj_Enemy_&quot; + string(global.Level));<br />
<br />
if (object_exists(obj))<br />
if (object_exists(_obj))<br />
{<br />
    instance_create_layer(random(room_width), random(room_height), obj, &quot;Enemy_Layer&quot;);<br />
}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<title>Audio Loop Points</title>
<meta name="topic-status" content="Draft" />
<link rel="stylesheet" type="text/css" href="../../../../../assets/css/default.css" />
Expand Down Expand Up @@ -74,7 +74,7 @@ <h3>Converting from BPM</h3>
<p class="code">var _bpm_to_sec = time_bpm_to_seconds(126);<br />
var _beats_per_bar = 4;<br />
var _bars = 4;<br />
audio_sound_loop_start(snd_bgm, _bars * _beats_per_bars);</p>
audio_sound_loop_start(snd_bgm, (_bars * _beats_per_bar) * _bpm_to_sec);</p>
<p>This code sets the loop start position for a sound asset <span class="inline2">snd_bgm</span> to the start of the fifth bar.</p>
<p>See: </p>
<ul class="colour">
Expand All @@ -94,7 +94,7 @@ <h2>Limitations</h2>
<div>Next: <a data-xref="{title}" href="../Audio_Emitters/Audio_Emitters.htm">Audio Emitters</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. 2025 All Rights Reserved</span></h5>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">ind</span></td><td><span data-keyref="Type_Asset_Font"></span></td>
<td><span class="notranslate">The index of the font to delete.</span></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>direction</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>friction</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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>hspeed</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4>Les retours :</h4>
<h4>Exemple :</h4>
<p class="code">for (var i = 0; i &lt; instance_count; i++;)<br />
{<br />
    if instance_id[i] != id<br />
    if (instance_id[i] != id)<br />
    {<br />
        instance_id[i].scr += 5;<br />
    }<br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Expand Down Expand Up @@ -36,13 +36,14 @@ <h4>Exemple :</h4>
<div style="float:left">Retour : <a href="Instance_Variables.htm">Variables d'instance</a></div>
<div style="float:right">Suivant : <a href="alarm.htm"><span class="notranslate">alarm</span></a></div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<h5><span data-keyref="Copyright Notice">Copyright <span class="notranslate">YoYo Games Ltd.</span> 2022 Tous droits réservés</span></h5>
</div>
<!-- KEYWORDS
layer
--><!-- TAGS
-->
<!-- TAGS
layer
--></body>
-->
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>vspeed</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>x</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>y</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>instance_furthest</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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand All @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">x</span></td><td><span data-keyref="Type_Real"></span></td>
<td><span class="notranslate">The x position to check for instances far from.</span></td>
Expand All @@ -47,7 +47,7 @@ <h4>Les retours :</h4>
<h4>Exemple :</h4>
<p class="code">var inst;<br />
inst = instance_furthest(x, y, object_index);<br />
if (inst != id) <br />
if (inst != id)<br />
{<br />
    draw_line(x, y, inst.x, inst.y);<br />
}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>instance_nearest</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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand All @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">x</span></td><td><span data-keyref="Type_Real"></span></td>
<td><span class="notranslate">The x position to check from.</span></td>
Expand All @@ -49,7 +49,7 @@ <h4>Exemple :</h4>
xx = x;<br />
x -= 10000;<br />
inst = instance_nearest(xx, y, object_index);<br />
if (inst != id) <br />
if (inst != id)<br />
{<br />
    draw_line(x, y, inst.x, inst.y);<br />
}<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h4>Les retours :</h4>
<p> </p>
<h4>Exemple :</h4>
<p class="code">var _inst = instance_place(x, y, obj_Enemy);<br />
if (_inst != noone) <br />
if (_inst != noone)<br />
{<br />
    hp -= _inst.dmg;<br />
    instance_destroy(_inst);<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ <h4>Exemple :</h4>
inst = instance_position(mouse_x, mouse_y, obj_Pause_Button);<br />
if (inst != noone)<br />
{<br />
    with (inst) image_index=1;<br />
    with (inst)<br />
    {<br />
        image_index = 1;<br />
    }<br />
    instance_create_layer(room_width / 2, 0, &quot;Controllers&quot;, obj_Menu);<br />
}</p>
<p>Le code ci-dessus vérifiera s'il y a une collision avec une instance de &quot;obj_Pause_Button&quot; à la position de la souris, et s'il y en a une, il utilisera l'id retourné pour définir son image_index à une nouvelle valeur avant de créer une nouvelle instance de l'objet &quot;obj_Menu&quot;.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">obj</span></td><td><span data-keyref="Type_Asset_Object"></span></td>
<td><span class="notranslate">The index of the object to check</span></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">obj</span></td><td><span data-keyref="Type_Asset_Object"></span></td>
<td><span class="notranslate">The index of the object to check</span></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Syntaxe :</h4>
<tr>
<th>Arguments</th><th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td><span class="notranslate">obj</span></td><td><span data-keyref="Type_Asset_Object"></span></td>
<td><span class="notranslate">The index of the object to check</span></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>path_endaction</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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand All @@ -23,7 +23,7 @@ <h1>path_endaction</h1>
</colgroup>
<tbody>
<tr>
<th colspan="2"><span data-keyref="Type_Constant_Path_End_Action"><a data-rhwidget="HyperlinkPopover" href="../../../../../../GameMaker_Language/GML_Reference/Asset_Management/Paths/Path_Variables/path_endaction.htm">Path End Action Constant</a></span></th>
<th colspan="2"><span data-keyref="Type_Constant_Path_End_Action"><a href="path_endaction.htm" target="_blank">Path End Action Constant</a></span></th>
</tr>
<tr>
<th>Constant</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>path_position</title>
<meta name="generator" content="Adobe RoboHelp 2019" />
<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"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Loading

0 comments on commit 153e3b7

Please sign in to comment.