#inventory Help
23 messages · Page 1 of 1 (latest)
You wouldn't be able to do it with structs alone. You would also need arrays, or another data structure to be able to have a list of items.
I would look into arrays and/or ds lists in the manual. I highly recommend arrays though.
once you understand structs and arrays, then you can tackle making an inventory
i somewhat understand arrays
you need to fully understand them and structs. For structs, it would be best if you understood constructors.
are there any good videos that aren't old or out of date explaining them
Part 1 of what structs are and how to use them in GameMaker Studio 2.3. Part of the Coding Fundamentals in GML Tutorial Series.
Patreon Support
https://www.patreon.com/samspadegamedev
Links:
https://manual.yoyogames.com/GameMaker_Language/GML_Overview/Structs.htm
https://manual.yoyogames.com/GameMaker_Language/GML_Overview/Struct_Forbidden_Var...
https://www.youtube.com/watch?v=MKgDkhKC050&t=6s is this one good also?
GML is now more "OOP" with Structs & Constructors! Watch the video for an in-depth preview of the updated GML.
📃 Read more about the update: https://www.yoyogames.com/blog/549/gamemaker-studio-2-3-new-gml-features
💗 Check out my latest Udemy course: https://www.youtube.com/watch?v=aUq4xBsruHI
(Really appreciate all the support!)
🤝 Join our Di...
sure, they're both short so may as well watch them both
sams has multiple parts
I'd check out their array videos too
so anything that's 2.3 or above that should be fine it looks like
it should yes
data structures are a bit of an advanced topic in most programming languages, which is why inventories can be overwhelming for a lot of people
once you understand them, inventories are much much easier to make
i did a while back make a very simple inventory doing this ```global.items =
{
wood: 4,
sap: 10,
woodPlank: 12
}
https://www.youtube.com/watch?v=fa26B54JDDk i know i been told NOT to watch this guy but is this video really bad or can i learn something from him
Support me and these videos on Patreon! https://www.patreon.com/peytonburnham
Full tutorial on creating functional items and inventories for ANY game! Hopefully it helps you out and you can get through my rambling!
Menu System Video (very helpful to watch if you're not comfortable with "for" loops and arrays yet): https://youtu.be/xLasKr0ekHY
...
highly recommend not watching any of his stuff, it'll only hurt you in the long run
{
Name = "apple"
How_many = 0
}
function wood () : Tree() constructor
{
Name = "Wood"
How_many = 0
}
function sapling () : Tree() constructor
{
Name = "apple"
How_many = 0
}``` so im trying to make this now im 99% sure the "error" means nothing but i want to make that 100% unless i wrote this wrong it should be fine right
and this is the video im copying from just using my own words