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.11 monthly manual #225

Merged
merged 320 commits into from
Dec 17, 2024
Merged
Changes from 3 commits
Commits
Show all changes
320 commits
Select commit Hold shift + click to select a range
7458eb9
docs(general): Video playback page fix
gurpreetsinghmatharoo Sep 12, 2024
8f5fcf4
Merge pull request #173 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Sep 13, 2024
4a2974e
docs(feature): FP - document marginInline
gurpreetsinghmatharoo Sep 13, 2024
8080376
docs(feature): Android file injection directory fix
gurpreetsinghmatharoo Sep 13, 2024
0eeb52e
docs(feature); Add a function to toggle strict error handling for aud…
gurpreetsinghmatharoo Sep 17, 2024
b02efe6
docs(feature): Documented user-facing changes as a result of decoupli…
gurpreetsinghmatharoo Sep 17, 2024
4dc5728
Merge pull request #174 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Sep 17, 2024
1c83a4b
Merge pull request #172 from nekonesse/patch-2
gurpreetsinghmatharoo Sep 17, 2024
1351561
Merge pull request #171 from nekonesse/patch-1
gurpreetsinghmatharoo Sep 17, 2024
c81da74
docs(feature): Fix back link on array_find_index - case sensitivity
gurpreetsinghmatharoo Sep 18, 2024
e4ffe53
docs(feature): Document window_minimise and window_restore
gurpreetsinghmatharoo Sep 18, 2024
43e17a9
docs(feature): Split instance keywords into pages, documented updated…
gurpreetsinghmatharoo Sep 18, 2024
42ae564
docs(general): Added line on structs page about self
gurpreetsinghmatharoo Sep 19, 2024
5ffdfda
docs(general): Document self behaviour in a struct literal
gurpreetsinghmatharoo Sep 19, 2024
b27277a
docs(general): "Guide To Using Shaders" page has incorrect in the cod…
gurpreetsinghmatharoo Sep 19, 2024
2642fcf
docs(feature): Update buffer_get/set_surface examples in regard to su…
gurpreetsinghmatharoo Sep 19, 2024
4185431
docs(general): Manual Content: log2() page's example shows subtractio…
gurpreetsinghmatharoo Sep 19, 2024
b83ef67
docs(general): Document 'other' behaviour in a struct literal
gurpreetsinghmatharoo Sep 19, 2024
a3efcb3
docs(general): self page fix
gurpreetsinghmatharoo Sep 19, 2024
2c09242
docs(general): network_create_server_raw() page's example incorrectly…
gurpreetsinghmatharoo Sep 19, 2024
092e829
docs(feature): Throw an exception when calling a constructor function…
gurpreetsinghmatharoo Sep 19, 2024
3bce1eb
Merge pull request #175 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Sep 20, 2024
2b37c12
docs(feature): CE2 - Commenting one line selection with control k sho…
gurpreetsinghmatharoo Sep 20, 2024
7dfb6b1
Merge branch 'develop' into develop.bart
YYBartT Sep 20, 2024
506052f
docs(feature): File Watcher Preferences page does not describe a "del…
YYBartT Sep 23, 2024
0661944
Merge branch 'develop' into develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Sep 30, 2024
59d8e46
docs(feature): event_object returns ref now
gurpreetsinghmatharoo Oct 1, 2024
b380ec4
docs(general): RoboHelp\helpdocs_keywords.json has a typo "udio_stop_…
gurpreetsinghmatharoo Oct 1, 2024
5bb947a
docs(general): "particleSystemIndex" key found in sequence keyframe d…
gurpreetsinghmatharoo Oct 1, 2024
90d45e0
docs(general): string_replace() and string_replace_all() pages have t…
gurpreetsinghmatharoo Oct 1, 2024
1d31de7
docs(general): "No Mouse Input" and Mouse Wheel events are not docume…
gurpreetsinghmatharoo Oct 1, 2024
e275d9d
docs(feature): audio_sound_gain manual page describes volume argument…
gurpreetsinghmatharoo Oct 1, 2024
f589251
docs(general): Manual incorrectly says that precise per frame collisi…
gurpreetsinghmatharoo Oct 1, 2024
132ef84
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 1, 2024
fa23fe6
docs(general): real english fix
gurpreetsinghmatharoo Oct 1, 2024
3335a6a
docs(feature): audio_play_sound() and audio_play_sound_at() are not c…
gurpreetsinghmatharoo Oct 1, 2024
690bbe4
docs(general): vertex_type_ubyte4 type buffers show all values as 0
YYBartT Oct 1, 2024
1db1f47
docs(general): vertex_type_ubyte4 type buffers show all values as 0
YYBartT Oct 1, 2024
a15ba35
Merge pull request #176 from YoYoGames/develop.bart
gurpreetsinghmatharoo Oct 2, 2024
cbfbbb7
docs(general): game_restart() does not clear out time sources created…
YYBartT Oct 2, 2024
9cdbff0
docs(general): audio_play_in_sync_group() is not affected by audio_th…
gurpreetsinghmatharoo Oct 3, 2024
57abfc8
docs(feature): mention mouse lock on mouse set pages
gurpreetsinghmatharoo Oct 3, 2024
38b9ce2
docs(general): Fix glossary colour on PC - only mobile version should…
gurpreetsinghmatharoo Oct 3, 2024
81249ab
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 3, 2024
29e35e7
Merge pull request #177 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 3, 2024
0c6616f
docs(general): Improvements to asynchronous HTTP function pages
YYBartT Oct 3, 2024
41a2b7e
docs(feature): Clarify audio errors on html5
gurpreetsinghmatharoo Oct 4, 2024
b8e7355
docs(feature): Static initialisation no longer runs multiple times as…
YYBartT Oct 5, 2024
cce1b75
docs(feature): PR #179 review
gurpreetsinghmatharoo Oct 7, 2024
837d4d8
Merge pull request #179 from YoYoGames/develop.bart
gurpreetsinghmatharoo Oct 7, 2024
9dfb6de
docs(general): is_instanceof() uses poor argument name constructor_name
YYBartT Oct 7, 2024
e7972ea
docs(general): Increasing the pitch of a streamed audio asset too muc…
YYBartT Oct 7, 2024
fcfb0f6
Merge branch 'develop.bart.temp' into develop.bart
YYBartT Oct 7, 2024
1a575d1
docs(general): method_call() with an incorrect first argument throws …
YYBartT Oct 8, 2024
f6c3bb2
docs(general): method_call() with an incorrect first argument throws …
YYBartT Oct 9, 2024
6039953
docs(general): Using script_execute or script_execute_ext on methods …
YYBartT Oct 9, 2024
58c69be
docs(general): PR #181 review
gurpreetsinghmatharoo Oct 10, 2024
59b25d6
Merge pull request #181 from YoYoGames/develop.bart
gurpreetsinghmatharoo Oct 10, 2024
e696e4b
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 11, 2024
caf7aa4
docs(general): Mention the difference that script function and method…
gurpreetsinghmatharoo Oct 11, 2024
f7b9d9b
docs(feature): Defining a script function will make it available thro…
gurpreetsinghmatharoo Oct 11, 2024
e65687a
docs(feature): [GX.games] Add a "save as .zip" output type which avoi…
YYBartT Oct 11, 2024
c56d291
Merge branch 'develop' into develop.bart
YYBartT Oct 11, 2024
db8ec0b
docs(general): listed language features on the GML Overview page
YYBartT Oct 14, 2024
eef14b0
docs(feature): Document that methods are structs and their static str…
gurpreetsinghmatharoo Oct 15, 2024
2877b13
docs(general): Small update of Arrays page
YYBartT Oct 15, 2024
3375737
Merge pull request #184 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 15, 2024
5f6d706
docs(general): go to page button 1
gurpreetsinghmatharoo Oct 16, 2024
a332e1c
docs(general): go to page fix - didn't work with 'localhost'
gurpreetsinghmatharoo Oct 16, 2024
d3b8098
docs(general): go to page fix - ignore anchor tags
gurpreetsinghmatharoo Oct 16, 2024
7588078
Merge pull request #185 from YoYoGames/go-to-gh-page-button
gurpreetsinghmatharoo Oct 16, 2024
cba5306
fix for running only one if condition
ksuchitra532 Oct 16, 2024
410f3a4
docs(general): No explanation of what needs to be cleaned up when cre…
YYBartT Oct 16, 2024
e6f63e8
docs(general): No explanation of what needs to be cleaned up when cre…
YYBartT Oct 16, 2024
0f5f3ae
docs(general): go to github file - updated tooltip
gurpreetsinghmatharoo Oct 17, 2024
b11b0cd
docs(feature): fixes to GX.games compiling and preferences page
YYBartT Oct 17, 2024
5afd5b4
docs(general): No explanation of what needs to be cleaned up when cre…
YYBartT Oct 17, 2024
37f0cd0
docs(general): fixed conditional code injection tag "toInject" -> "to…
YYBartT Oct 18, 2024
98a9544
docs(general): removed space character in heading
YYBartT Oct 18, 2024
db0625c
docs(general): Lighting-related built-in uniforms don't work correctl…
YYBartT Oct 21, 2024
138ee3b
docs(feature): GX.games export text fix (Compiling page)
gurpreetsinghmatharoo Oct 22, 2024
86b259c
Merge pull request #182 from YoYoGames/develop.bart
gurpreetsinghmatharoo Oct 22, 2024
308b646
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 22, 2024
fc7b0e2
docs(general): small changes to string_set_byte_at() page
YYBartT Oct 22, 2024
38c6734
docs(general): Consider adding manual page detailing 'pass by referen…
YYBartT Oct 22, 2024
57c8ba3
Merge branch 'develop.bart.values_references' into develop.bart
YYBartT Oct 22, 2024
82ce59e
docs(general): small changes to a few pages
YYBartT Oct 22, 2024
ad044a1
Merge branch 'develop' into develop.bart
YYBartT Oct 22, 2024
45fca0f
Update Android_Extensions.htm
shichen85 Oct 22, 2024
d50ac4b
Initial version (no styling)
Oct 23, 2024
c45eea0
Merge pull request #188 from YoYoGames/develop.rwkay
gurpreetsinghmatharoo Oct 23, 2024
b4f95bf
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 23, 2024
379a417
Removed requirement on URL constructor
Oct 23, 2024
5f60a50
Fix issue with getting the startup setup.
Oct 23, 2024
81d8bd6
docs(feature): Disable/change settings for default code content in sc…
YYBartT Oct 23, 2024
faad68d
Merge branch 'develop' into develop.bart
YYBartT Oct 23, 2024
2e4d617
Merge pull request #189 from YoYoGames/develop.rwkay
gurpreetsinghmatharoo Oct 24, 2024
4a523c9
docs(general): Remove requirement of URL constructor, fix placement a…
gurpreetsinghmatharoo Oct 24, 2024
6cee187
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Oct 24, 2024
d89d0b0
Merge pull request #190 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 24, 2024
89b1deb
docs(general): language switcher
gurpreetsinghmatharoo Oct 24, 2024
5c4fdf8
Merge pull request #187 from shichen85/patch-1
gurpreetsinghmatharoo Oct 24, 2024
476578d
docs(feature): Disable/change settings for default code content in sc…
YYBartT Oct 24, 2024
d63ed14
docs(general): improvements to array_equals page
YYBartT Oct 24, 2024
6dc0c8c
Merge pull request #191 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 25, 2024
8d4c795
docs(general): potential fix for context view language switcher clicks
gurpreetsinghmatharoo Oct 25, 2024
a31aa50
Merge pull request #192 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 25, 2024
289943a
docs(general): language switcher fix - didn't appear on no context pa…
gurpreetsinghmatharoo Oct 25, 2024
f2a4861
Merge pull request #193 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 25, 2024
1105b65
docs(general): language switcher - recreate on page load
gurpreetsinghmatharoo Oct 25, 2024
de1a921
Merge pull request #194 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 25, 2024
739dcc1
docs(general): update to pass by val/ref page
gurpreetsinghmatharoo Oct 28, 2024
fd55e99
docs(general): pass by val/ref - small fix
gurpreetsinghmatharoo Oct 28, 2024
b41e7e0
docs(general): array_copy() when "src_index" is invalid will silently…
YYBartT Oct 28, 2024
1e8bc24
Merge branch 'develop.bart.current' into develop.bart
YYBartT Oct 28, 2024
f57481c
Merge branch 'develop' into develop.bart
YYBartT Oct 28, 2024
e5bed0a
docs(general): Consider adding manual page detailing 'pass by referen…
YYBartT Oct 28, 2024
fd560ec
docs(general): Consider adding manual page detailing 'pass by referen…
YYBartT Oct 28, 2024
334343c
docs(general): Consider adding manual page detailing 'pass by referen…
YYBartT Oct 28, 2024
a682d97
docs(general): Update to pass by val/ref page, move IDs note to Data …
gurpreetsinghmatharoo Oct 29, 2024
b6b1a21
Merge pull request #186 from YoYoGames/develop.bart
gurpreetsinghmatharoo Oct 29, 2024
cfc4e8f
docs(general): Language switcher - add delay
gurpreetsinghmatharoo Oct 29, 2024
bd6c173
Merge pull request #195 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Oct 29, 2024
eab588f
docs(feature): Add support for script_execute()/script_execute_ext() …
YYBartT Oct 29, 2024
946d3d3
docs(feature): Add support for script_execute()/script_execute_ext() …
YYBartT Oct 29, 2024
32344f8
docs(feature): Add support for script_execute()/script_execute_ext() …
YYBartT Oct 29, 2024
b395b67
docs(general): keyboard_unset_map() shows wrong example
YYBartT Oct 29, 2024
0f88962
docs(general): lowercase variable names on audio_pause_sound() page
YYBartT Oct 30, 2024
d7a460a
docs(general): Error (typo) in Online Manual
YYBartT Oct 30, 2024
339898e
docs(general): Error (typo) in Online Manual
YYBartT Oct 30, 2024
90a380f
docs(general): Minor Documentation Error/Typo
YYBartT Oct 30, 2024
b1eed8f
docs(general): reversed order of debug output on array_sort() page
YYBartT Oct 30, 2024
90dc64f
docs(general): Linked PS note for gamepad_set_vibration
gurpreetsinghmatharoo Oct 31, 2024
f99c8e1
docs(general): window_mouse_set_locked states its only usuable for De…
YYBartT Oct 31, 2024
4dd7c02
Add note on snippets
gurpreetsinghmatharoo Nov 1, 2024
a824c15
docs(general): Improved docs for variable scopes, mention that consta…
gurpreetsinghmatharoo Nov 1, 2024
b41c876
docs(general): Remove advice of enumerating gamepad slots directly
gurpreetsinghmatharoo Nov 1, 2024
294a67d
docs(general): Event User Not Triggered During Clean Up Event
YYBartT Nov 1, 2024
0776c83
docs(general): Event User Not Triggered During Clean Up Event
YYBartT Nov 1, 2024
dd0368c
docs(general): clarify documentation on variable_clone()
YYBartT Nov 4, 2024
1b5feb7
docs(general): document syntax for defining method in struct
gurpreetsinghmatharoo Nov 5, 2024
1a70944
Merge pull request #207 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Nov 5, 2024
ea97271
docs(general): Updated text and image for Variable Scopes
gurpreetsinghmatharoo Nov 5, 2024
40157cf
docs(feature): Windows arm64 export
gurpreetsinghmatharoo Nov 5, 2024
34298ee
Merge pull request #210 from YoYoGames/develop.gurpreet.warm64
gurpreetsinghmatharoo Nov 5, 2024
4ccc6c8
docs(feature): Update structs and arrays documentation to mention tha…
gurpreetsinghmatharoo Nov 5, 2024
d92c171
docs(general): typo fix on Game Options page
YYBartT Nov 5, 2024
2b89229
docs(general): made Back/Next links under "GameMaker Runner" consiste…
YYBartT Nov 5, 2024
134e903
docs(feature): Remove the now redundant "Generate mipmaps for separat…
YYBartT Nov 5, 2024
48283d1
docs(general): Small changes to matrix function pages
YYBartT Nov 5, 2024
88b0cfb
Merge pull request #211 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Nov 6, 2024
e9a50e3
docs(general): Removed image for variable scopes
gurpreetsinghmatharoo Nov 6, 2024
02475b3
docs(feature): script_execute typo fix
gurpreetsinghmatharoo Nov 6, 2024
b21d9bd
docs(feature): update CE2 undo limit to 200
gurpreetsinghmatharoo Nov 6, 2024
1fe1015
Merge pull request #212 from YoYoGames/develop.bart
gurpreetsinghmatharoo Nov 6, 2024
196605d
docs(feature): Fix GX.games compile options image
gurpreetsinghmatharoo Nov 6, 2024
16c880a
docs(feature): Documented SVG import support
gurpreetsinghmatharoo Nov 7, 2024
1b5c18a
docs(feature): Document new IDE updater
gurpreetsinghmatharoo Nov 7, 2024
4b5438f
docs(feature): Mention that some updates could be forced
gurpreetsinghmatharoo Nov 7, 2024
84e25c0
docs(general): add note about matrices being stored in arrays
YYBartT Nov 8, 2024
d36c8b5
Merge pull request #213 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Nov 11, 2024
746fd2b
Merge branch 'develop' into develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Nov 11, 2024
502f486
docs(feature): Add a new function matrix_inverse() for inverting a ma…
YYBartT Nov 11, 2024
f980538
Merge branch 'develop.bart.matrix_functions_and_inverse' into develop…
YYBartT Nov 11, 2024
1c66409
Merge branch 'develop' into develop.bart
YYBartT Nov 11, 2024
68cb13a
docs(general): Remove mention of 'delete' freeing memory in the next …
gurpreetsinghmatharoo Nov 11, 2024
71a8683
docs(general): Event User Not Triggered During Clean Up Event
YYBartT Nov 11, 2024
a92b182
docs(feature): Add options for toggling legacy behaviours for string-…
YYBartT Nov 12, 2024
5c88d7e
docs(feature): Add a Game Option for controlling whether unused asset…
YYBartT Nov 12, 2024
c90e3a0
docs(feature): Document Path to Project Tool preference
YYBartT Nov 13, 2024
cd53c3d
docs(general): Added a note to mention that websockets are not suppor…
YYBartT Nov 14, 2024
081d709
docs(general): When launching a GM game that only supports full-scree…
YYBartT Nov 14, 2024
25861c5
docs(general): "Privately attach this project" should be reworded to …
YYBartT Nov 15, 2024
5053611
docs(general): "Privately attach this project" should be reworded to …
YYBartT Nov 15, 2024
7980e14
docs(general): typo fix
YYBartT Nov 16, 2024
e456213
docs(general): define pre-creation code
YYBartT Nov 18, 2024
3d3e580
docs(feature): added particleSystemID to activeTracks
YYBartT Nov 18, 2024
188c22b
docs(general): updated code example on alarm manual page
YYBartT Nov 18, 2024
cc5c855
docs(general): updated code example on alarm manual page
YYBartT Nov 18, 2024
de96979
docs(feature): Enforce restarting GameMaker immediately whenever togg…
gurpreetsinghmatharoo Nov 19, 2024
c303570
docs(general): updated Keyboard Shortcuts page
YYBartT Nov 19, 2024
b1d23ab
docs(feature): [iOS] Add "add -FIRDebugEnabled" to the launch options…
YYBartT Nov 19, 2024
f379163
docs(feature): array functions clamp offset to upper bound, string_de…
YYBartT Nov 19, 2024
474be3f
docs(feature): [iOS] Add "add -FIRDebugEnabled" to the launch options…
YYBartT Nov 19, 2024
904236d
docs(general): Precreation code update
gurpreetsinghmatharoo Nov 20, 2024
50b82cb
docs(feature): Small changes to deprecated options
gurpreetsinghmatharoo Nov 20, 2024
bcd25a4
docs(feature): Marked references of Package Manager as beta only
gurpreetsinghmatharoo Nov 20, 2024
d2ded50
docs(feature): Mark SVG support as beta only
gurpreetsinghmatharoo Nov 20, 2024
866f8da
docs(feature): Add options for toggling legacy behaviours for string-…
YYBartT Nov 20, 2024
5b0a3b4
docs(general): remove CE2 shortcuts from shortcuts page
YYBartT Nov 20, 2024
7ebc5df
docs(general): sprite_get_bbox_left() page code example has left and …
YYBartT Nov 20, 2024
b1f9168
docs(general): Emitter ind found in particle_get_info is a number, no…
YYBartT Nov 20, 2024
1fbb34d
docs(general): Incorrect Manual entry note for network_send_broadcast
YYBartT Nov 20, 2024
a1251a9
Merge pull request #216 from YoYoGames/develop.bart
gurpreetsinghmatharoo Nov 21, 2024
db4c820
Merge branch 'develop' into develop.gurpreet
gurpreetsinghmatharoo Nov 21, 2024
ce2ceaa
docs(feature): Marked package manager as non-beta
gurpreetsinghmatharoo Nov 21, 2024
add0308
docs(feature): document localisation plugins with GMPM
gurpreetsinghmatharoo Nov 21, 2024
c41b70a
Merge branch 'develop.gurpreet' into develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Nov 21, 2024
a3f9207
docs(feature): CE2 (Beta) update
gurpreetsinghmatharoo Nov 21, 2024
2b00f10
docs(general): "Privately attach this project" should be reworded to …
YYBartT Nov 21, 2024
d042a32
Merge branch 'develop' into develop.bart
YYBartT Nov 21, 2024
e71575d
docs(general): renamed page listing built-in instance vars to "Built-…
YYBartT Nov 21, 2024
8e3f441
docs(feature): Fixed indentation for code blocks that got messed up b…
gurpreetsinghmatharoo Nov 21, 2024
6f4b33c
docs(general): renamed page listing built-in instance vars to "Built-…
YYBartT Nov 21, 2024
4e3d093
docs(general): moved sprite instance variables to a common snippet
YYBartT Nov 21, 2024
4c0bdee
docs(general): Set Video Status Constant to the correct URL
YYBartT Nov 22, 2024
b510637
docs(general): Confusing text in manual
YYBartT Nov 22, 2024
4d12d72
docs(general): moved sprite instance variables to a common snippet
YYBartT Nov 22, 2024
3ef2172
docs(general): small changes on the Room Editor pages
YYBartT Nov 22, 2024
f36990a
docs(general): Sound Mixer: Setting a column volume does not work as …
YYBartT Nov 25, 2024
e51e689
docs(general): Audio queues with no queued buffers will remain in a '…
YYBartT Nov 25, 2024
c43a19c
docs(general): Function highscore_value() return value is defined as …
YYBartT Nov 25, 2024
6247075
docs(general): added Code Editor 2 shortcuts to Keyboard Shortcuts page
YYBartT Nov 25, 2024
990a953
feat(highlighting): template string support
thennothinghappened Aug 21, 2024
d6312e1
feat(highlighting): string escapes & unicode literals
thennothinghappened Aug 21, 2024
69f9283
feat(highlighting): numerical string templates
thennothinghappened Aug 21, 2024
ba4beb5
fix(highlighting): missing `infinity` keyword
thennothinghappened Aug 21, 2024
df27ce4
style(highlighting): randomly missing whitespace
thennothinghappened Nov 26, 2024
ef110ba
fix(highlighting): struct literal eats ternary
thennothinghappened Nov 26, 2024
799010c
docs(general): Audio queues with no queued buffers will remain in a '…
YYBartT Nov 26, 2024
ef53188
docs(general): Fix linux command typo on gamepad input page
gurpreetsinghmatharoo Nov 27, 2024
5a4c0bd
Merge pull request #220 from thennothinghappened/syntax-highlighting-…
gurpreetsinghmatharoo Nov 27, 2024
157bb0f
Merge pull request #221 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Nov 27, 2024
8478cff
Merge branch 'develop' into develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Nov 27, 2024
f326524
docs(feature): Updated ToC, added prefab lib page
gurpreetsinghmatharoo Nov 27, 2024
5d83b89
docs(general): Several in-built variables do not open their own manua…
YYBartT Nov 27, 2024
f12918f
docs(general): Clarify information about the event order
YYBartT Nov 27, 2024
7f9fd76
docs(feature): Update homepage to clean up links
gurpreetsinghmatharoo Nov 28, 2024
e414cea
docs(feature): Basic prefab library page
gurpreetsinghmatharoo Nov 28, 2024
6e2b12a
docs(feature): mention tile set usage for prefabs
gurpreetsinghmatharoo Nov 28, 2024
81a8294
docs(general): debug_mode deprecated but no replacement?
YYBartT Nov 28, 2024
333ddff
docs(feature): added initial images for prefab library
gurpreetsinghmatharoo Nov 28, 2024
117df05
docs(feature): [Android] android:windowLayoutInDisplayCutoutMode does…
YYBartT Nov 28, 2024
20a710a
docs(feature): [Android] android:windowLayoutInDisplayCutoutMode does…
YYBartT Nov 28, 2024
d9dc093
docs(general): Manual: Image Editor Preferences - Tool section missin…
YYBartT Nov 28, 2024
5e6d161
docs(feature): Updates to prefabs page, fixed descriptions on new IDE…
gurpreetsinghmatharoo Nov 29, 2024
2dcc850
docs(general): gl_FragData problem and shader not working when having…
YYBartT Dec 3, 2024
81929f1
docs(general): fix unexisting list on page
YYBartT Dec 3, 2024
44a649d
Merge branch 'develop' into develop.bart
YYBartT Dec 4, 2024
67375d8
docs(general): small fix
YYBartT Dec 4, 2024
12156a7
docs(general): note on error when audio group isn't loaded
YYBartT Dec 4, 2024
24d9c4e
Merge pull request #223 from YoYoGames/develop.gurpreet
gurpreetsinghmatharoo Dec 5, 2024
4ddc1df
docs(feature): Make the frame number visible inside the Sprite Editor
YYBartT Dec 5, 2024
3e3f93e
docs(general): Fixed the page for Error Reporting, text was wrong
gurpreetsinghmatharoo Dec 6, 2024
d8d6e04
Merge pull request #224 from YoYoGames/develop.bart
gurpreetsinghmatharoo Dec 6, 2024
3ec5576
docs(feature): Fixed var file formatting
gurpreetsinghmatharoo Dec 6, 2024
86bacb4
Revert "docs(feature): Fixed var file formatting"
gurpreetsinghmatharoo Dec 6, 2024
52d2b86
Merge branch 'develop' into develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Dec 6, 2024
db130af
Merge pull request #147 from YoYoGames/develop.gurpreet.codeeditor2
gurpreetsinghmatharoo Dec 6, 2024
e1a644b
Merge pull request #222 from YoYoGames/develop.gurpreet.prefabs
gurpreetsinghmatharoo Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Manual/contents/GameMaker_Language/GML_Overview/Arrays.htm
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ <h1><span data-field="title" data-format="default">Arrays</span></h1>
show_debug_message(_val);</p>
<p class="dropspot">The output would show <span class="inline2">&quot;Hi!&quot;</span>.</p>
<p class="dropspot">As you can see, you give the array a variable name and then a value in square brackets <span class="inline2">[ ]</span>, where the value is the position in the array to get the data from. So essentially, an array is a container with a number of slots to store values, and each position in the container has a specific number to identify it, which is what we put in the <span class="inline2">[ ]</span>. It&#39;s worth noting that the contents of an array <b>always start at 0</b> and can <i>never be negative</i><em>!</em></p>
<h3 class="dropspot">       Creating Arrays</h3>
<h3 class="dropspot" id="creating_arrays">Creating Arrays</h3>
<p class="dropspot">We&#39;ve shown how to check an array for data, but how do we create the array to start with? First it has to be <i>initialised</i> before we can use it or <span data-keyref="GameMaker Name">GameMaker</span> will give us an error. Initialising an array just means that we give each slot of the array an initial value in preparation for it to be used elsewhere in the project code. This is important to remember as it means that you have to do a certain amount of planning before using arrays, but it is easy enough to initialise one using a repeat loop like this:</p>
<p class="code">var i = 9;<br />
<br />
@@ -54,12 +54,12 @@ <h3 class="dropspot">       Creating Arrays</h3>
<p class="dropspot">This tells <span data-keyref="GameMaker Name">GameMaker</span> that the variable <span class="inline2">my_array</span> is an array, and you can then <a href="../GML_Reference/Variable_Functions/array_push.htm">add values</a> to it at any time in the future. However, if you try to access a value in an empty array then you will get an error.</p>
<p class="dropspot">If you already know which items you want to put into the array, you can add comma-separated values between the brackets when declaring the array:</p>
<p class="code">my_array = [&quot;Steve&quot;, 36, &quot;ST-3V3 - Steve Street&quot;];</p>
<h3 class="dropspot">       Array Bounds</h3>
<h3 class="dropspot" id="array_bounds">Array Bounds</h3>
<p class="dropspot">You should always take care to only access valid array positions, as trying to access a value outside of an array will also give an error. For example, this will cause the project to crash when run:</p>
<p class="code">my_array = array_create(5, 0);<br />
var _val = my_array[6];</p>
<p class="dropspot">The array was only initialised with 5 positions, but we&#39;ve tried to get position 7 - since arrays are numbered from 0, <span class="inline2">my_array[6]</span> is position 7 - therefore the game generates an error and crashes.</p>
<h3 class="dropspot">       Using Arrays</h3>
<h3 class="dropspot" id="using_arrays">Using Arrays</h3>
<p class="dropspot">Now how do we use an array practically? Exactly the same as we would use a normal variable, as shown in the following examples:</p>
<p class="code">// Add two array values together<br />
total = array[0] + array[5];<br />
@@ -85,7 +85,7 @@ <h3 class="dropspot">       Using Arrays</h3>
draw_text(32, 32 + (i * 32), _total);
</p>
<p class="dropspot">The above code will add up all the values in our array, draw each one of them and then draw the total value at the end.</p>
<h3 class="dropspot">       Deleting Arrays</h3>
<h3 class="dropspot" id="deleting_arrays">Deleting Arrays</h3>
<p class="dropspot">The last thing to mention about arrays is that you can delete an array simply by &quot;re-assigning&quot; the variable that defines it to a single value. This will free up the memory associated with all the positions and values for that array. For example:</p>
<p class="code">// Create an array<br />
for (var i = 9; i &gt; -1; --i)<br />
@@ -143,7 +143,7 @@ <h3 class="dropspot">       Deleting Arrays</h3>
array[0][0] = 1;
</p>
<p class="dropspot">In the above code, <span class="inline2" id="">array[0]</span> has 2 slots, <span class="inline2">array[1]</span> has 4 slots and <span class="inline2">array[2]</span> has 3 slots.</p>
<h3 class="dropspot">       Extended Example</h3>
<h3 class="dropspot">Extended Example</h3>
<p class="dropspot">Here is one final example of how this may be used in an actual game: Say you want to spawn four different enemies at four different points in your game depending on a random value. Well, we can use an array with 2 dimensions to do this and save writing out a load of code.</p>
<p class="dropspot">First we should initialise the array we are going to use in the Create event of our &quot;controller&quot; object (note the use of comments to remind you what each array entry does):</p>
<p class="code">enemy[3][2] = 448;       //y position<br />
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>array_copy</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" />
@@ -16,7 +16,7 @@
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">array_copy</span></h1>
<p>This function copies all or part of an array into another array at any position.</p>
<p>You supply both the source and the destination arrays (both created previously), as well as a position within the source array to copy from and a position within the destination array to copy to. Finally you need to specify the length of the array (or the length of the part that you want) to copy. If the data being copied exceeds the length of the destination array, the array will be extended to accept the data. The function supports specifying negative values for the index and number of elements, as described under <a data-xref="{text}" href="Array_Functions.htm#h1">Offset And Length</a>.</p>
<p>You supply both the source and destination arrays (both created previously), as well as a position within the source array to copy from and a position within the destination array to copy to. Finally you need to specify the length of the array (or the length of the part that you want) to copy.</p>
<p>This function can also be used for multidimensional arrays, as long as you specify which dimension you want to copy when you supply the array index, following this pattern:</p>
<p class="code">// Copy to the first dimension of an array<br />
// from the second dimension of an array<br />
@@ -26,8 +26,14 @@ <h1><span data-field="title" data-format="default">array_copy</span></h1>
// from the first dimension of an array<br />
array_copy(item_array[0][0], 0, inventory_array, 0, len);<br />
<br />
// etc...
// etc.
</p>
<h3>Usage Notes</h3>
<ul class="colour">
<li>The function supports specifying negative values for source and destination index and number of elements, as described under <a data-xref="{text}" href="Array_Functions.htm#offset_and_length">Offset And Length</a>.</li>
<li>The range given by the source index and length must be within the source array&#39;s bounds, as attempting to read <span>outside of the array</span> will throw an error. See <a data-xref="{text}" href="../../GML_Overview/Arrays.htm#array_bounds">Array Bounds</a>.</li>
<li>If the data being copied exceeds the length of the destination array, the array will be extended to accept the data. If the destination index is greater than the destination array&#39;s size, zeroes are inserted. Negative destination offsets are clipped to 0.</li>
</ul>
<p> </p>
<h4>Syntax:</h4>
<p class="code"><span data-field="title" data-format="default">array_copy</span>(dest, dest_index, src, src_index, length);</p>
@@ -40,28 +46,28 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>dest</td>
<td><span data-keyref="Type_Array"><a href="../../../../GameMaker_Language/GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td><span data-keyref="Type_Array"><a href="../../GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td>The reference to the array to copy to.</td>
</tr>
<tr>
<td>dest_index</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The index within the array to copy to. Negative indices are supported and count from the end of the array. An offset of -1 refers to the last element of the array, an offset of -2 to the one before last element, etc. (see <a data-xref="{text}" href="Array_Functions.htm#h1">Offset And Length</a>)</td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The index within the array to copy to. Negative indices are supported and count from the end of the array. An offset of -1 refers to the last element of the array, an offset of -2 to the one before last element, etc. (see <a data-xref="{text}" href="Array_Functions.htm#offset_and_length">Offset And Length</a>)</td>
</tr>
<tr>
<td>src</td>
<td><span data-keyref="Type_Array"><a href="../../../../GameMaker_Language/GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td><span data-keyref="Type_Array"><a href="../../GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td>The reference to the array to copy from.</td>
</tr>
<tr>
<td>src_index</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The index within the array to start copying from. Negative indices are supported and count from the end of the array. An offset of -1 refers to the last element of the array, an offset of -2 to the one before last element, etc. (see <a data-xref="{text}" href="Array_Functions.htm#h1">Offset And Length</a>)</td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The index within the array to start copying from. Negative indices are supported and count from the end of the array. An offset of -1 refers to the last element of the array, an offset of -2 to the one before last element, etc. (see <a data-xref="{text}" href="Array_Functions.htm#offset_and_length">Offset And Length</a>)</td>
</tr>
<tr>
<td>length</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The length (number of array indices) to copy, starting with the value at src_index. A negative value can be provided for length; in this case copying also starts at index src_index, but the next elements that are copied are src_index-1, src_index-2, etc. I.e. elements are copied &quot;backwards&quot;. Note that the first value is always written at dest_index, the second value at dest_index+1, etc.</td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The length (number of array indices) to copy, starting with the value at <span class="inline2">src_index</span>. A negative value can be provided for length; in this case copying also starts at index <span class="inline2">src_index</span>, but the next elements that are copied are <span class="inline2">src_index-1</span>, <span class="inline2">src_index-2</span>, etc. I.e. elements are copied &quot;backwards&quot;. Note that the first value is always written at <span class="inline2">dest_index</span>, the second value at <span class="inline2">dest_index+1</span>, etc.</td>
</tr>
</tbody>
</table>
@@ -70,7 +76,7 @@ <h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Void">N/A</span></p>
<p> </p>
<h4>Example 1: Basic Use</h4>
<p class="code">if (!array_equals(inventory_array, item_array)) <br />
<p class="code">if (!array_equals(inventory_array, item_array))<br />
{<br />
    var _len = array_length(inventory_array);<br />
    array_copy(item_array, 0, inventory_array, 0, _len);<br />
@@ -84,18 +90,28 @@ <h4>Example 2: Negative Length</h4>
array_copy(_a, 1, _b, -1, -2);<br />
show_debug_message(_a);
</p>
<p>In the above example, first two temporary arrays <span class="inline2">_a</span> and <span class="inline2">_b</span> are initialised. Next two elements are copied from <span class="inline2">_b</span> to <span class="inline2">_a</span>. The src_index and length parameter are set to -1 and -2, respectively. This means that the last (-1) and the one before last array element are copied (2 elements, counting backwards because of the minus sign, from the end of array <span class="inline2">_b</span>). This means the values of the last element and one before last element of <span class="inline2">_b</span> are copied to positions 1 (the value of the dest_index parameter) and 2 in <span class="inline2">_a</span> respectively.</p>
<p>In the above example, first two temporary arrays <span class="inline2">_a</span> and <span class="inline2">_b</span> are initialised. Next two elements are copied from <span class="inline2">_b</span> to <span class="inline2">_a</span>. The <span class="inline2">src_index</span> and <span class="inline2">length</span> parameter are set to -1 and -2, respectively. This means that the last (-1) and the one before last array element are copied (2 elements, counting backwards because of the minus sign, from the end of array <span class="inline2">_b</span>). This means the values of the last element and one before last element of <span class="inline2">_b</span> are copied to positions 1 (the value of the <span class="inline2">dest_index</span> parameter) and 2 in <span class="inline2">_a</span> respectively.</p>
<p>A debug message shows the contents of array <span class="inline2">_a</span> after copying.</p>
<p> </p>
<h4>Example 3: Extending the Destination Array</h4>
<p class="code">var _a = [-3, -2, -1];<br />
var _b = [1, 2, 3];<br />
<br />
array_copy(_a, 5, _b, 0, 3);<br />
show_debug_message(_a);
</p>
<p>The code example above shows copying to a position beyond the destination array&#39;s length.</p>
<p>Two arrays <span class="inline2">_a</span> and <span class="inline2">_b</span> are first initialised. The entire contents of array <span class="inline2">_b</span> are then copied to index 5 in array <span class="inline2">_a</span> using <span class="inline3_func"><span data-field="title" data-format="default">array_copy</span></span>. Since index 5 is three elements past <span class="inline2">_a</span>&#39;s current highest index (the value -1 at index 2), <span class="inline2">_a</span> is extended with two zeroes and the contents of <span class="inline2">_b</span> are added after that. After the copy, <span class="inline2">_a</span> holds the array <span class="inline2">[-3, -2, -1, 0, 0, 1, 2, 3]</span>. This is then shown in a debug message.</p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a data-xref="{title}" href="Array_Functions.htm">Array Functions</a></div>
<div style="float:right">Next: <a href="array_equals.htm">array_equals</a></div>
<div style="float:right">Next: <a data-xref="{title}" href="array_equals.htm">array_equals</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
array_copy
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>array_equals</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" />
@@ -15,30 +15,39 @@
</head>
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1>array_equals</h1>
<p>With this function you can check to see if two arrays are equal (equivalent or the same). You give the two arrays to check, and the function will return <span class="inline">true</span> if they are equal (either equivalent or the same) or <span class="inline">false</span> if they are not. Note that this is <i>not</i> the same as checking if two arrays are the same using ==, which will not check to see if the two arrays hold equivalent values, but only to see if the arrays are referencing the same initial array. For example:</p>
<p class="code">var a = [1,2,3,4];<br />
var b = [1,2,3,4];<br />
<br />
if (a == b)<br />
{<br />
    show_debug_message( &quot;This will never fire, as a and b do not reference the SAME array&quot; );<br />
}<br />
<br />
if (array_equals(a, b))<br />
{<br />
    show_debug_message( &quot;This will fire as both arrays contain similar values&quot; );<br />
}
</p>
<p>Note that there are some constants that may not be equal to themselves, which can make this function fail. Here is an example:</p>
<p class="code">if (array_equals([NaN], [NaN]))<br />
{<br />
    show_debug_message( &quot;This will never fire as NaN cannot be equal to itself&quot; );<br />
}</p>
<p>See the <a data-xref="{text}" href="../../../Additional_Information/Type_Tables.htm#h">Equality Table</a> for more information.</p>
<h1><span data-field="title" data-format="default">array_equals</span></h1>
<p>This function checks if two arrays are equal (equivalent or the same).</p>
<p>You give the two arrays to check, and the function will return <span class="inline2">true</span> if they are equal (either equivalent or the same) or <span class="inline2">false</span> if they are not.</p>
<p>The check is performed recursively, i.e. nested arrays are checked as well.</p>
<h3>Usage Notes</h3>
<ul class="colour">
<li>This is <i>not</i> the same as checking if two arrays are the same using <span class="inline2">==</span>, which will not check if the two arrays hold equivalent values, but only if the arrays are referencing the same initial array. For example:
<p class="code">var a = [1, 2, 3, 4];<br />
var b = [1, 2, 3, 4];<br />
<br />
if (a == b)<br />
{<br />
    show_debug_message( &quot;This will never fire, as a and b do not reference the SAME array&quot; );<br />
}<br />
<br />
if (array_equals(a, b))<br />
{<br />
    show_debug_message( &quot;This will fire as both arrays contain similar values&quot; );<br />
}
</p>
</li>
<li>If an array element stores a reference to, e.g. a struct or an instance, the function doesn&#39;t compare the contents of those, but rather checks if both references refer to the same thing in memory. See <a data-xref="{title}" href="../../GML_Overview/Values_And_References.htm">Values and References</a></li>
<li>There are some constants that may not be equal to themselves, which can make this function fail. Here is an example:
<p class="code">if (array_equals([NaN], [NaN]))<br />
{<br />
    show_debug_message( &quot;This will never fire as NaN cannot be equal to itself&quot; );<br />
}</p>
See the <a data-xref="{text}" href="../../../Additional_Information/Type_Tables.htm#h">Equality Table</a> for more information.
</li>
</ul>
<p> </p>
<h4>Syntax:</h4>
<p class="code">array_equals(var1, var2);</p>
<p class="code"><span data-field="title" data-format="default">array_equals</span>(var1, var2);</p>
<table>
<tbody>
<tr>
@@ -48,38 +57,58 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>var1</td>
<td><span data-keyref="Type_Array"><a href="../../../../GameMaker_Language/GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td><span data-keyref="Type_Array"><a href="../../GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td>The first array.</td>
</tr>
<tr>
<td>var2</td>
<td><span data-keyref="Type_Array"><a href="../../../../GameMaker_Language/GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td><span data-keyref="Type_Array"><a href="../../GML_Overview/Arrays.htm" target="_blank">Array</a></span></td>
<td>The second array.</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Bool"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Boolean</a></span></p>
<p class="code"><span data-keyref="Type_Bool"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Boolean</a></span></p>
<p> </p>
<h4>Example:</h4>
<p class="code">if (!array_equals(inventory_array, item_array)) <br />
<h4>Example 1: Basic Use</h4>
<p class="code">var _array1 = [1, 2, 3, 4, 5];<br />
var _array2 = [1, 2, 5, 4, 3];<br />
<br />
if (!array_equals(_array2, _array1))<br />
{<br />
    var len = array_length(inventory_array);<br />
    array_copy(item_array, 0, inventory_array, 0, len);<br />
}</p>
<p>The above code will check two arrays to see if they hold equivalent values, and if they do not then the code will copy the entire contents of the array &quot;inventory_array&quot; to the array &quot;item_array&quot;.</p>
    var _len = array_length(_array1);<br />
    array_copy(_array2, 0, _array1, 0, _len);<br />
}<br />
<br />
show_debug_message(_array1);<br />
show_debug_message(_array2);
</p>
<p>The above code checks two arrays to see if they hold equivalent values. If they don&#39;t, the code will copy the entire contents of the array <span class="inline2">_array1</span> to the array <span class="inline2">_array2</span>. Both arrays are output in a debug message showing their contents are identical after the copy.</p>
<p> </p>
<h4>Example 2: Nested Arrays and References</h4>
<p class="code">var _the_struct = {a: 84, b: 38};<br />
<br />
var _array1 = [_the_struct, 5, &quot;hello&quot;, [&quot;this&quot;, &quot;that&quot;]];<br />
var _array2 = [_the_struct, 5, &quot;hello&quot;, [&quot;this&quot;, &quot;that&quot;]];<br />
var _array3 = [{a: 84, b: 38}, 5, &quot;hello&quot;, [&quot;this&quot;, &quot;that&quot;]];<br />
<br />
show_debug_message($&quot;_array1 equals _array2: {array_equals(_array1, _array2)}&quot;);<br />
show_debug_message($&quot;_array1 equals _array3: {array_equals(_array1, _array3)}&quot;);
</p>
<p>The above code shows a comparison between arrays that hold another array and a struct.</p>
<p>Three arrays <span class="inline2">_array1</span>, <span class="inline2">_array2</span> and <span class="inline2">_array3</span> are defined, each holding the exact same variables. Each array stores a struct in the first element that has a variable <span class="inline2">a</span> set to 84 and a variable <span class="inline2">b</span> set to 38. The first two arrays <span class="inline2">_array1</span> and <span class="inline2">_array2</span> reference the same struct, <span class="inline2">_array3</span> doesn&#39;t.</p>
<p>Next, <span class="inline2">_array1</span> and <span class="inline2">_array2</span> as well as <span class="inline2">_array1</span> and <span class="inline2">_array3</span> are compared using <span class="inline3_func"><span data-field="title" data-format="default">array_equals</span></span> and the results are output in a debug message. <span class="inline2">_array1</span> equals <span class="inline2">_array2</span> since both arrays hold identical contents. <span class="inline2">_array1</span> doesn&#39;t equal <span class="inline2">_array3</span>, however. While the struct in <span class="inline2">_array3</span> does have the same contents, it doesn&#39;t reference the same struct as <span class="inline2">_array1</span> and <span class="inline2">_array2</span><span class="inline3_func"><span data-field="title" data-format="default">array_equals</span></span> compares arrays recursively but doesn&#39;t follow references, instead it compares the references.</p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a data-xref="{title}" href="Array_Functions.htm">Array Functions</a></div>
<div style="float:right">Next: <a href="array_get.htm">array_get</a></div>
<div style="float:right">Next: <a data-xref="{title}" href="array_get.htm">array_get</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. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
array_equals