This advanced video tutorial shows you how to use efficient data with constructors in GameMaker.
Image you have an inventory with hundreds of entries and each entry has values like name, costs, icon image etc. . Creating for each entry one variable per value even with arrays is not an good way to handle that task. So what I think is one efficient way is to create structs via constructor and store each entry into one array. By that you have only one index that defines which item you want values from. That's it!
Tldr: Yes
Video on structs:
• Structs - light objects [Game Maker |...
// slime from the thumbnail:
https://ggoolmool.itch.io/slime
👑 Support me and get fresh game art and game maker projects every month:
/ 1upindie
Follow me on:
📸 Instangram: / 1upindie
🐦 Twitter: / 1upindie
💬 Discord: / discord
📜 Udemy: https://www.udemy.com/course/become-a... (See youtube about page for discount)
----------------------------------------------------------------------------------------
0:00 What we will do
1:22 Subscribe
1:34 Old school way of storing items/data with single variables
2:38 Using arrays to store
3:23 Using structs to store
6:29 Using constructors - Setup
7:00 Store each new entry/struct into an array
8:12 Adding variables to the constructor
10:00 How to grab entries/items
12:58 Modulary advance the constructor with a function