How To Use Array Functions in GML | GameMaker

preview_player
Показать описание
The new array functions introduced in 2022.11 make it easier and powerful to edit arrays and find things.

Everything you need to take your idea from concept to finished game. With no barriers to entry and powerful functionality, GameMaker is the ultimate 2D development environment!

00:00 Introduction
00:16 array_foreach()
00:53 array_map()
01:41 array_find_index()
02:18 array_filter()
Рекомендации по теме
Комментарии
Автор

GM please give this man a raise-- his content is the best out there in terms of quality & concision. I appreciate these intermediate level tutorials and think we need more content directed at this level.

mishi
Автор

Thanks for all the updates, you kids are kool!

stefanimal
Автор

Was trying to use array_find_index using the manual and couldn't figure it. Got the index I needed to delete, thanks so much!

_bubblezzzzzz_
Автор

The arrays in GM are basically array heaven

MichelSchallenberg
Автор

Thanks for this video.
It was, for me, a bit difficult to use "array_find_index" the way I wanted to - with struct in my array.

indieklem
Автор

Would have been nice if someone explains how to use array_find_index with more complex objects like objects or structs. This seems to be way more complicated than one would think when it comes to simple functions for getting indexes. I am not the only person with the same problem judging by the other comments.

ビーンバンデット
Автор

I have a hard time wrapping my head around array_find_index() - How would you use it to find an a specific item you are looking for? In the example, "sword" is hard-coded into the predicate function. How do you find the index if what you are looking for is decided during runtime, not compile time?

ollie_r
Автор

Finally! I'm mainly a Javascript developer and I am really glad GMS2 introduced the equivalents of filter, map, foreach and such.

oscur_destal
Автор

I have latest version and it seems like these new array functions doesnt exist/show in my IDE (If I write "array_map", it is shown as a new variable), do you know what possibly be the issue and how could I solve it? Thanks!

aggelandro
Автор

Now I can put my JS knowledge to use...

shadowind
Автор

Can you guys make a tutorial how to use the coding language

fullym
Автор

Please give us GUI tools so godot users stop laughing at us

alvin_row
Автор

Are you all going to convert gml to just be javascript one day? Cause I'm fine with that.

StallionTG
welcome to shbcf.ru