How To Use Array Functions in GML | GameMaker

  Рет қаралды 6,396

GameMaker

GameMaker

Күн бұрын

Пікірлер: 21
@mishi6693
@mishi6693 Жыл бұрын
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.
@_bubblezzzzzz_
@_bubblezzzzzz_ Жыл бұрын
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!
@tomitsolov3386
@tomitsolov3386 Ай бұрын
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.
@indieklem
@indieklem Жыл бұрын
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.
@GameMakerEngine
@GameMakerEngine Жыл бұрын
Then they're just gonna get hit with rocks and die, and die again 🙃. Post in the forum with a screenshot of your code and some hereo may rescue them. forum.gamemaker.io/index.php
@aggelandro
@aggelandro Жыл бұрын
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!
@stefanimal5257
@stefanimal5257 Жыл бұрын
Thanks for all the updates, you kids are kool!
@ollie_r8162
@ollie_r8162 Жыл бұрын
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?
@alvin_row
@alvin_row Жыл бұрын
Maybe there's a way to pass additional values to callback functions? Such as the item you're looking for
@GameMakerEngine
@GameMakerEngine Жыл бұрын
You can use method() to bind the callback method to a struct, that struct would hold the value you are looking for. Then you read that value in the function and use it as a predicate. Example function: function array_get_index(_array, _value) { static genericCallback = function(value, index) { return value == valueToSearch; } var specificCallback = method({ valueToSearch: _value}, genericCallback); return array_find_index(_array, specificCallback); }
@ollie_r8162
@ollie_r8162 Жыл бұрын
@@GameMakerEngine That's so cool, thank you so much!
@neoDarkSquall
@neoDarkSquall Жыл бұрын
Finally! I'm mainly a Javascript developer and I am really glad GMS2 introduced the equivalents of filter, map, foreach and such.
@AnnaDevid
@AnnaDevid Жыл бұрын
Хорошее и полезное видео, спасибо за него. Однако что будет с array_find_index() если в массиве два подходящих значения.
@alvin_row
@alvin_row Жыл бұрын
It probably returns the position of the first matching value. I'm sure it's in the documentation though
@AnnaDevid
@AnnaDevid Жыл бұрын
@@alvin_row okay, thank you for your answer
@shadowind30
@shadowind30 Жыл бұрын
Now I can put my JS knowledge to use...
@fullym5484
@fullym5484 Жыл бұрын
Can you guys make a tutorial how to use the coding language
@alvin_row
@alvin_row Жыл бұрын
There's plenty online!
@StallionTG
@StallionTG Жыл бұрын
Are you all going to convert gml to just be javascript one day? Cause I'm fine with that.
@alvin_row
@alvin_row Жыл бұрын
Please give us GUI tools so godot users stop laughing at us
@1upIndie
@1upIndie Жыл бұрын
Yes. Video content was also quite useful.
How To Improve Jumping In Your Platformer | GameMaker
5:41
GameMaker
Рет қаралды 13 М.
تعلم لغة الاسيمبلي الدرس 60
10:24
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 92 МЛН
НАШЛА ДЕНЬГИ🙀@VERONIKAborsch
00:38
МишАня
Рет қаралды 2,7 МЛН
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
Array Update [GameMaker Studio 2.3]
8:20
SamSpadeGameDev
Рет қаралды 9 М.
Arrays in GameMaker Studio - Part 1
16:02
Let's Learn This Together
Рет қаралды 10 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 720 М.
Passing Vars Between GameMaker Objects (3 Strategies)
17:20
RESOLUTION guide for game devs & GameMaker
8:50
Sara Spalding
Рет қаралды 64 М.
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Another Array Update  [GameMaker Studio 2.3.1]
5:53
SamSpadeGameDev
Рет қаралды 3,3 М.
How To Use Events In GameMaker
17:46
GameMaker
Рет қаралды 14 М.
Arrays - Data Structures in GameMaker
24:44
DragoniteSpam
Рет қаралды 3,4 М.
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 92 МЛН