From 59d8e46c22d6dbd8442b68c395f53e2043d151d6 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 1 Oct 2024 09:55:40 +0530 Subject: [PATCH 01/12] docs(feature): event_object returns ref now https://github.com/YoYoGames/GameMaker-Bugs/issues/7800 --- .../Objects/Object_Events/event_object.htm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_object.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_object.htm index 3f91c3f5..b8cb5db8 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_object.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Objects/Object_Events/event_object.htm @@ -4,7 +4,7 @@ event_object - + @@ -15,13 +15,13 @@

event_object

-

This read-only variable returns the object index of the instance which is running the event being checked.

+

This read-only variable returns the object handle of the instance which is running the event being checked.

 

Syntax:

event_object;

 

Returns:

-

Object Asset

+

Object Asset

 

Example:

global.obj = event_object;

@@ -36,7 +36,7 @@

Example:

Next: event_type
-
© Copyright YoYo Games Ltd. 2022 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved
\ No newline at end of file From 5bb947acadc6e953859a180bf525b7c54c352da0 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 1 Oct 2024 12:43:52 +0530 Subject: [PATCH 03/12] docs(general): "particleSystemIndex" key found in sequence keyframe data struct is undocumented https://github.com/YoYoGames/GameMaker-Bugs/issues/7584 --- .../Sequence_Structs/The_Keyframe_Data_Struct.htm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.htm b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.htm index 7f588b1c..1a0b908f 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Asset_Management/Sequences/Sequence_Structs/The_Keyframe_Data_Struct.htm @@ -14,7 +14,7 @@ -

The Keyframe Data Struct

+

The_Keyframe_Data_Struct.htm

When you define a keyframe struct for a track, you need to also define the data that will be associated with it. This is comprised of different channels, where each channel is simply a Keyframe Data Struct. A channel can be given specific type of data depending on what type of track you are setting the keyframe data for.

A Keyframe Data Struct contains the following variables:

@@ -47,6 +47,11 @@

The Keyframe Data StructSound Asset

+ + + + + From 90d45e02332980f792fb2111805cd1bcd5e266d9 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 1 Oct 2024 12:59:08 +0530 Subject: [PATCH 04/12] docs(general): string_replace() and string_replace_all() pages have the first argument documented incorrectly https://github.com/YoYoGames/GameMaker-Bugs/issues/7782 --- .../GML_Reference/Strings/string_replace.htm | 18 +++++++++--------- .../Strings/string_replace_all.htm | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_replace.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_replace.htm index 73b999cd..cc3584a2 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_replace.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/string_replace.htm @@ -4,7 +4,7 @@ string_replace - + @@ -16,7 +16,7 @@

string_replace

-

You can use this function to parse a string looking for a specific part, which can then be replaced by the new string that you have specified.

+

You can use this function to parse a string looking for a specific substring, which can then be replaced by the new string that you have specified. This will only replace one occurrence, to replace all of them use string_replace_all.

 

Syntax:

string_replace(str, substr, newstr);

@@ -29,29 +29,29 @@

Syntax:

- - + + - + - +
The index of the audio asset to use for the track. This property is only available for tracks of the type seqtracktype_audio and you can get or set it.
particleSystemIndexParticle System AssetThe particle system asset used for the track. This property is only available for tracks of the type seqtracktype_particlesystem and you can get or set it.
playbackMode Sequence Audio Key Constant
strStringThe string to be copied.StringThe string to be parsed.
substrStringString The substring within the string to be replaced.
newstrStringString The new substring to replace the previous one.

 

Returns:

-

String

+

String

 

Example:

str1 = "Hello Earth";
str2 = string_replace(str1, "Earth", "World");

-

This will set str2 to str1, but with its instance of "Earth" replaced with "World", resulting in str2 being "Hello World".

+

This will set str2 to str1, but with its first instance of "Earth" replaced with "World", resulting in str2 being "Hello World".

 

 

 

@@ -62,7 +62,7 @@

Example:

Next: string_replace_all
-
© Copyright YoYo Games Ltd. 2022 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved

string_replace_all

-

You can use this function to parse a string looking for specific parts, which can then be replaced by the new string that you have specified in all places that they occur.

+

You can use this function to parse a string looking for specific substrings, which can then be replaced by the new string that you have specified in all places that they occur.

 

Syntax:

string_replace_all(str, substr, newstr);

@@ -29,24 +29,24 @@

Syntax:

str - String - The string to be copied. + String + The string to be parsed. substr - String + String The substring within the string to be replaced in all instances. newstr - String + String The new substring to replace the previous one(s).

 

Returns:

-

String

+

String

 

Example:

str1 = "Hexxo Worxd";
@@ -62,7 +62,7 @@

Example:

Next: string_upper
-
© Copyright YoYo Games Ltd. 2022 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved
-

The Sprite Editor

-

The Sprite EditorThe Sprite Editor is where you set the general properties for sprites that you make. You can open this window by creating a new sprite (right-click RMB Icon on The Asset Browser and select Create Sprite), by double-clicking LMB Icon on an existing sprite or by right-clicking RMB Icon an existing sprite and selecting Properties.

+

Sprites.htm

+

The Sprite EditorSprites.htm is where you set the general properties for sprites that you make. You can open this window by creating a new sprite (right-click RMB Icon on The Asset Browser and select Create Sprite), by double-clicking LMB Icon on an existing sprite or by right-clicking RMB Icon an existing sprite and selecting Properties.

The parts that make up the Sprite Editor are as follows:

Sprite Name

@@ -58,7 +58,7 @@

The Sprite EditorAll sprites have a collision mask which corresponds to the area of the sprite that will be used to detect collisions when the sprite is assigned to an instance. You can first set the Mode for the collision mask, which can be one of the following:

  • Automatic: GameMaker will calculate the collision mask automatically based on the sprite alpha values (this will depend on the Tolerance setting explained below).
  • -
  • Full Image: The mask will be calculated with it's bounds being the same as the left, right, top and bottom bounds of the sprite.
  • +
  • Full Image: The mask will be calculated with its bounds being the same as the left, right, top and bottom bounds of the sprite.
  • Manual: Selecting this means that you wish to set the bounds of the collision mask using the input values for left, right, top and bottom.

Apart from the collision mask Mode, there are also various types of collision mask which you can choose from the drop down menu:

@@ -75,8 +75,7 @@

The Sprite EditorCollisionsThe collision checking options are very important ones for your game, as they will directly influence how your objects interact and how your game runs, with the wrong settings even having a negative impact on the over all performance. Why is that? Well, whenever two instances meet, and both instances have a valid mask, a collision event is generated by checking the overlap of the bounding box and the mask, which can either be precise or not, and adapted to the image index or not. Below is an image to illustrate this:

Different collisions and how they are resolved

Beneath the collision mask setting, you have the alpha tolerance slider, which indicates the tolerance for creating the mask with respect to the transparency of the sprites pixels - with a higher tolerance pixels that are partially transparent are left outside the mask, while with a lower tolerance the mask will take into account those pixels. This influences both the bounding box (when not set to manual) and the mask for precise collision checking.

-

Finally you can set the Bounding Box limits for the mask. The bounding box is the name given to the rectangular area that the sprite mask fits in. Only pixels inside this bounding box are used for the mask and will be involved in collision checking, and by default this is automatically computed, taking the alpha tolerance into account. If you have "precise (per frame)" checked then this will be separate for each sub-image too. When setting it yourself, you can input the values in the boxes for left, right top and bottom, or you can click LMB Icon in the sprite preview window and drag to "draw" it over the sprite. Note that when "drawing" the bounding box, the mask is automatically generated to fit within the end values, and the bounding box can "clip" the mask.

-

It is worth noting that if you go to the Preview window, you can adjust the collision mask using the "handles" found in each corner. Clicking and dragging these will adjust the collision mask just the same as inputing values for the bounding box would.

+

Finally you can set the Bounding Box limits for the mask. The bounding box is the name given to the rectangular area that the sprite mask fits in. Only pixels inside this bounding box are used for the mask and will be involved in collision checking, and by default this is automatically computed, taking the alpha tolerance into account. When setting it yourself, you can input the values in the boxes for left, right top and bottom. If you go to the Preview window, you can adjust the collision mask using the "handles" found in each corner. Clicking and dragging these will adjust the collision mask just the same as inputing values for the bounding box would.

 

Nine Slice

From fa23fe6ded1736e4fbeb4fa9f74ebbcdca717bee Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Tue, 1 Oct 2024 14:22:40 +0530 Subject: [PATCH 08/12] docs(general): real english fix --- .../GML_Reference/Strings/real.htm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/Strings/real.htm b/Manual/contents/GameMaker_Language/GML_Reference/Strings/real.htm index 0b2c7803..a4dc9f23 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/Strings/real.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/Strings/real.htm @@ -4,7 +4,7 @@ real - + @@ -17,9 +17,9 @@

real

This function can be used to turn a value into a real number.

-

When using this function on a string, numbers, minus signs, decimal points and exponential parts in the string are taken into account, while other characters (such as letters) will cause an error to be thrown. If a string may have other characters then you can use string_digits to remove all non-numeric characters, before using this function to turn the resulting string into a real number.

+

When using this function on a string, numbers, minus signs, decimal points and exponential parts in the string are taken into account, while other characters (such as letters) will cause an error to be thrown. If a string has other characters then you can use string_digits to remove all non-numeric characters, before using this function to turn the resulting string into a real number.

 Hexadecimal numbers are also supported in a string. These strings should have a format "0x00F".

-

 This function can also be used to convert some other data types to Real, such as int64.

+

 This function can also be used to convert some other data types to Real, such as int64.

Syntax:

real(string);

@@ -31,14 +31,14 @@

Syntax:

- +
stringStringString The string to be converted to a real value.

 

Returns:

-

Real

+

Real

 

Example:

var t_str = string_digits(input_str);
@@ -53,7 +53,7 @@

Example:

Next: string_byte_at
-
© Copyright YoYo Games Ltd. 2023 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved

window_mouse_set

-

With this function you can change or set the position of the mouse within the game window which can be useful for FPS games, for example. The function will only work while the game is in focus and using alt + tab will unlock the mouse.

+

With this function you can change or set the position of the mouse within the game window which can be useful for FPS games, for example. The function will only work while the game is in focus and using alt + tab will unlock the mouse.

NOTE For regular mouse functions see the section on Mouse Input.

+

  You can lock the mouse within the window by calling window_mouse_set_locked which removes the need to set the mouse position manually.

 

Syntax:

window_mouse_set(x, y);

@@ -30,12 +31,12 @@

Syntax:

x - Real + Real The x coordinate in the window. y - Real + Real The y coordinate in the window. @@ -56,7 +57,7 @@

Example:

Next: window_set_caption
-
© Copyright YoYo Games Ltd. 2023 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved

display_mouse_set

-

With this function you can change or set the position of the mouse within the game display which can be useful for FPS games, for example. The function will only work while the game is in focus and using ALT + Tab will unlock the mouse.

+

With this function you can change or set the position of the mouse within the game display which can be useful for FPS games, for example. The function will only work while the game is in focus and using ALT + Tab will unlock the mouse.

+

  You can lock the mouse within the window by calling window_mouse_set_locked which removes the need to set the mouse position manually.

 

Syntax:

display_mouse_set(x, y);

- + + - + - + + - + - + + - +
ArgumentTypeArgumentType Description
xxReal The x coordinate in the display.
yyReal The y coordinate in the display.

 

Returns:

-

+

N/A

 

Example:

display_mouse_set(display_get_width() / 2, display_get_height() / 2);

@@ -53,7 +57,7 @@

Example:

Next: display_set_gui_size
-
© Copyright YoYo Games Ltd. 2021 All Rights Reserved
+
© Copyright YoYo Games Ltd. 2024 All Rights Reserved