Skip to content

Commit

Permalink
Merge pull request #92 from YoYoGames/develop.gurpreet
Browse files Browse the repository at this point in the history
Develop.gurpreet
  • Loading branch information
gurpreetsinghmatharoo authored Feb 15, 2024
2 parents e0c8708 + bd6dc13 commit 479255d
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 48 deletions.
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>White-space Characters</title>
<meta name="topic-status" content="Draft" />
<link rel="stylesheet" type="text/css" href="../assets/css/default.css" />
Expand All @@ -15,7 +15,7 @@
<body>
<h1><span data-field="title" data-format="default">White-space Characters</span></h1>
<p>The following table lists the character codes and escape sequences that <span data-keyref="GameMaker Name">GameMaker</span> considers to be white-space characters. An empty cell in the table indicates there is no escape sequence for that character code.</p>
<p>For a detailed list of all these characters, see <a href="https://en.wikipedia.org/wiki/Whitespace_character#Unicode">Whitespace_character</a>.</p>
<p>For a detailed list of all these characters, see <a href="https://en.wikipedia.org/wiki/Whitespace_character#Unicode">Whitespace character</a>.</p>
<table border="1" cellpadding="1" cellspacing="1" id="table" style="caption-side: top">
<caption>Whitespace Characters</caption>
<colgroup>
Expand Down Expand Up @@ -66,7 +66,7 @@ <h1><span data-field="title" data-format="default">White-space Characters</span>
</tr>
<tr>
<td> </td>
<td>&quot;\u000A&quot;</td>
<td>&quot;\<span>u00A0</span>&quot;</td>
<td>no-break space</td>
</tr>
<tr>
Expand Down Expand Up @@ -195,7 +195,7 @@ <h1><span data-field="title" data-format="default">White-space Characters</span>
<div>Next: <a data-xref="{title}" href="Vectors.htm">Vectors</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2022 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>argument</h1>
<p>This variable acts as an <a href="../../Arrays.htm">array</a> that is used along with the read-only variable <span class="inline2"><a href="argument_count.htm">argument_count</a></span> in <a href="../../Script_Functions.htm">script functions</a> or <a href="../../Method_Variables.htm">methods</a>. Each index holds an input value for the function and is specifically for use with <em>variable </em>argument functions (i.e. where the number of arguments can vary between calls).</p>
<p>An argument that hasn&#39;t been passed in will be <span class="inline">undefined</span>.</p>
<p>Note that there are also a series of independent global scope variables that can also be used in user-defined functions to reference the different input arguments: <span class="inline">argument0</span>, <span class="inline">argument1</span>, <span class="inline">argument2</span>, etc... up to <span><span class="inline">argument15</span>.</span></p>
<p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"> </span> As this variable does not hold a real GML array, you cannot run any <a href="../../../GML_Reference/Variable_Functions/Array_Functions.htm">array functions</a> on it. The only operation you can run on this is returning a value at an index, with the <span class="inline2">argument[index]</span> syntax.</p>
<div data-conref="../../../../assets/snippets/GML_Not_real_array.hts"> </div>
<p> </p>
<h4>Syntax:</h4>
<p class="code">argument[<em>n</em>]<br />
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_change</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" />
Expand All @@ -16,9 +16,10 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1>instance_change</h1>
<p>You can use this function to change one instance of an object into another instance of a different object, and while doing so decide whether to perform the initial instances Destroy and Clean Up Events and the new instances Create Event. In this way, you can have (for example) a bomb change into an explosion - in which case the &quot;perf&quot; argument would probably be true as you would want the bomb to perform its Destroy Event and Clean Up Event, as well as the explosion to perform its Create Event - or you could have your player character change into a different one - in which case the &quot;perf&quot; argument would probably be false as you do not want the instances to perform their Create and Destroy/Clean Up events.</p>
<p>It is worth noting that changing the instance means that you should perform no further actions with that instance until the next step, in particular trying to access variables etc... as that will cause an error. Basically, you change the instance but it is not actually available until the end of the current step, so to access any of the variables it contains directly (for example, calling <span class="inline">obj_Changed.x</span>) will not work.</p>
<p class="note"><b>WARNING!</b> When changing a physics enabled instance, the physical properties <b>will not be carried over</b> to the new instance being changed into. Therefore you should have code in place to &quot;transfer&quot; the physics state of the current instance over to the new instance, or have defined the new instances physical properties in its Create Event, or in the object editor. For this reason it is recommended that you not use this function with physics enabled instances, but rather use a combination of <span style="font-size:1px;"><span class="inline">instance_destroy()</span></span> and <span><span style="font-size:1px;"><span class="inline">instance_create_layer()</span></span>.</span></p>
<p>You can use this function to change one instance of an object into another instance of a different object, and while doing so decide whether to perform the initial instance&#39;s Destroy and Clean Up Events and the new instance&#39;s Create Event.</p>
<p>In this way, you can have (for example) a bomb change into an explosion - in which case the &quot;perf&quot; argument would probably be true as you would want the bomb to perform its Destroy Event and Clean Up Event, as well as the explosion to perform its Create Event - or you could have your player character change into a different one - in which case the &quot;perf&quot; argument would probably be false as you do not want the instances to perform their Create and Destroy/Clean Up events so it keeps the same properties.</p>
<p>It is worth noting that changing the instance means that you should perform no further actions with that instance until the next step, in particular trying to access variables etc. as that will cause an error. Basically, you change the instance but it is not actually available until the end of the current step, so to access any of the variables it contains directly (for example, calling <span class="inline2">obj_Changed.x</span>) will not work.</p>
<p class="note"><span data-conref="../../../../assets/snippets/Tag_warning.hts"> </span> When changing a physics enabled instance, its physical properties <b>will not be carried over</b> to the new instance being changed into. Therefore you should have code in place to &quot;transfer&quot; the physics state of the current instance over to the new instance, or have defined the new instance&#39;s physical properties in its Create Event, or in the object editor. For this reason it is not recommended to use this function with physics enabled instances, but rather use a combination of the functions <span style="font-size:1px;"><span class="inline2">instance_destroy()</span></span> and <span><span style="font-size:1px;"><span class="inline2">instance_create_layer()</span></span>.</span></p>
<p> </p>
<h4>Syntax:</h4>
<p class="code">instance_change(obj, perf);</p>
Expand All @@ -31,13 +32,13 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>obj</td>
<td><span data-keyref="Type_Asset_Object">Object Asset</span></td>
<td><span data-keyref="Type_Asset_Object"><a href="../../../../The_Asset_Editors/Objects.htm" target="_blank">Object Asset</a></span></td>
<td>The new object the calling object will change into.</td>
</tr>
<tr>
<td>perf</td>
<td><span data-keyref="Type_Bool">Boolean</span></td>
<td>Whether to perform that new object&#39;s Create and Destroy events (true) or not (false).</td>
<td><span data-keyref="Type_Bool"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Boolean</a></span></td>
<td>Whether to perform creation and destruction events (<span class="inline2">true</span>) or not (<span class="inline2">false</span>).</td>
</tr>
</tbody>
</table>
Expand All @@ -54,15 +55,14 @@ <h4>Example:</h4>
<p>The above code will change the calling instance into an instance of &quot;obj_Player_Swimming&quot; without performing the original instances destroy event nor the new instances create event when the user presses the &quot;Enter&quot; key, exiting the code block when done.</p>
<p> </p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a href="Instances.htm">Instances</a></div>
<div style="float:right">Next: <a href="instance_copy.htm">instance_copy</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2022 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
instance_change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1>instance_id</h1>
<p>This <b>read-only</b> <a href="../../../GML_Overview/Arrays.htm">array</a> holds all the <a href="Instance_Variables/id.htm"><span class="inline">id</span>s</a> of every <em>active </em>instance within the room. This means that if you have used any of the <a href="Deactivating_Instances/Deactivating_Instances.htm">Instance Deactivate</a> functions those instances that have been deactivated will not be included in this array (if you have used a value from this array previously, it will now return the keyword <a href="../../../GML_Overview/Instance_Keywords.htm">noone</a>).</p>
<p>This <b>read-only variable acts as an</b> <a href="../../../GML_Overview/Arrays.htm">array</a> that holds the <a href="Instance_Variables/id.htm"><span class="inline">id</span>s</a> of all <em>active </em>instances within the room. This means that if you have used any of the <a href="Deactivating_Instances/Deactivating_Instances.htm">Instance Deactivate</a> functions those instances that have been deactivated will not be included in this array.</p>
<div data-conref="../../../../assets/snippets/GML_Not_real_array.hts"> </div>
<p>As you cannot run <span class="inline3_func"><a data-xref="{title}" href="../../Variable_Functions/array_length.htm">array_length</a></span> on this function, use <span class="inline2"><a data-xref="{title}" href="instance_number.htm">instance_number</a>(all)</span> to get the number of instances in the room. Any entries outside of this range will return <span class="inline2">noone</span> (-4).</p>
<p> </p>
<h4>Syntax:</h4>
<p class="code">instance_id[num];</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_number</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" />
Expand All @@ -23,18 +23,20 @@ <h4>Syntax:</h4>
<table>
<tbody>
<tr>
<th>Argument</th><th>Type</th>
<th>Argument</th>
<th>Type</th>
<th>Description</th>
</tr>
</tr>
<tr>
<td>obj</td><td><span data-keyref="Type_Asset_Object"></span></td>
<td>The object to total the number of instances of.</td>
</tr>
<td>obj</td>
<td><span data-keyref="Type_Asset_Object"><a href="../../../../The_Asset_Editors/Objects.htm" target="_blank">Object Asset</a></span></td>
<td>The object to get the number of instances of, or the keyword <span class="inline2">all</span> to count all instances</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Real"></span></p>
<p class="code"><span data-keyref="Type_Real"><a href="../../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></p>
<p> </p>
<h4>Example:</h4>
<p class="code">if instance_number(object_index) &lt; 50<br />
Expand All @@ -52,7 +54,7 @@ <h4>Example:</h4>
<div style="float:right">Next: <a href="instance_place.htm">instance_place</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. 2023 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
instance_number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">buffer_poke</span></h1>
<p>With the <span class="inline3_func"><a data-xref="{title}" href="buffer_write.htm">buffer_write</a></span> function, you can write data to the given buffer at the current &quot;seek&quot; position, with each piece of data advancing this position by the bytes being written or read. However, it may be necessary for you to change a given piece of data without wanting to change the current seek position, and that&#39;s when you would use this function. You supply the function with a buffer, and then the offset position from the buffer start (in bytes) within that buffer to write to, as well as the data type and the value to be written.</p>
<p>With this function you can write data into a buffer at the specified offset, without changing the <a href="buffer_seek.htm">seek position</a>. This is different from <span class="inline3_func"><a data-xref="{title}" href="buffer_write.htm">buffer_write</a></span>, which uses the <a href="buffer_tell.htm">current seek position</a> as the offset and advances that with the amount of bytes written.</p>
<p>You supply the function with a buffer, and then the offset position from the buffer start (in bytes) within that buffer to write to, as well as the data type and the value to be written.</p>
<p> </p>
<h4>Syntax:</h4>
<p class="code"><span data-field="title" data-format="default">buffer_poke</span>(buffer, offset, type, value);</p>
Expand All @@ -28,22 +29,22 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>buffer</td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer</a></span></td>
<td><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></td>
<td>The buffer to use.</td>
</tr>
<tr>
<td>offset</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 position (in bytes) within the buffer to write the given data to.</td>
</tr>
<tr>
<td>type</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="buffer_write.htm" target="_blank">Buffer Data Type Constant</a></span></td>
<td>The type of data that is to be written to the buffer (see the list of constants <a href="buffer_write.htm">here</a>).</td>
</tr>
<tr>
<td>value</td>
<td><span data-keyref="Type_Any"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm#variable" target="_blank">Any</a></span></td>
<td><span data-keyref="Type_Any"><a href="../../GML_Overview/Data_Types.htm#variable" target="_blank">Any</a></span></td>
<td>The data to add to the buffer, in accordance with the type specified.</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">buffer_seek</span></h1>
<p>This function moves the seek position of a buffer, setting it relative to the start, end or current seek position (that which was last used when reading or writing data).</p>
<p>The seek position is the offset (in bytes) from the start of the buffer where new values are written, and from where values are read. It also moves automatically when you read from or write to a buffer.</p>
<p>The seek position is the offset (in bytes) from the start of the buffer where new values are <a href="buffer_write.htm">written</a>, and from where values are <a href="buffer_read.htm">read</a>. It also moves automatically when you read from or write to a buffer.</p>
<h3>Usage Notes</h3>
<ul class="Disc">
<li>The &quot;offset&quot; value is the offset (in bytes) to add to the given seek position, for example, if the base is relative and the offset is 4, then the buffer position will move along 4 bytes from its current position. Please note the following:
Expand All @@ -35,7 +35,7 @@ <h3>Usage Notes</h3>
</colgroup>
<tbody>
<tr>
<th colspan="2"><span data-keyref="Type_Constant_Buffer_Seek"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_seek.htm" target="_blank">Buffer Seek Constant</a></span></th>
<th colspan="2"><span data-keyref="Type_Constant_Buffer_Seek"><a href="buffer_seek.htm" target="_blank">Buffer Seek Constant</a></span></th>
</tr>
<tr>
<th>Constant</th>
Expand Down Expand Up @@ -67,24 +67,24 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>buffer</td>
<td><span data-keyref="Type_ID_Buffer"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer</a></span></td>
<td><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></td>
<td>The buffer to use.</td>
</tr>
<tr>
<td>base</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 base position to seek.</td>
</tr>
<tr>
<td>offset</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 data offset value.</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span> (the new seek position)</p>
<p class="code"><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span> (the new seek position)</p>
<p> </p>
<h4>Example:</h4>
<p class="code"><span data-field="title" data-format="default">buffer_seek</span>(buff, buffer_seek_start, 0);<br />
Expand Down
Loading

0 comments on commit 479255d

Please sign in to comment.