I almost never comment on videos... but brother, the style in which you do a tutorial is like being in a 1 to 1 classroom. You explain everything brilliantly and dont rush a thing. I love the way you show us the how to do something firsty, then show us how to streamline it. Amazing work and thank you!
Thank you so much for making these videos. Everytime you upload it makes my week! They're so easy and relaxing to follow, it makes coding not as daunting. It's made learning a much more smooth and enjoyable time for me. Thank you sm for all the effort you put into these gems 💖
@@peytonburnham4316 please never stop making these amazing videos! Could you maybe make a tutorial video on how to trigger a battle by talking to an npc like in pokemon?
THANK YOU FOR THIS!!! Such a coincidence that today I was gonna work on my inventory for my game!! Ive been watching your videos to help create my game and they’ve helped me a lot!!😭💕💕 I just started coding like two months ago and your tutorials has saved me
@@saxenart i was working on it, but i eventually had to stop to focus on other projects. in the future i hope to make an rpg game, so in the far future i might make a tutorial lol
Alright guys, here me out. You might have one of these questions in your head about this video. The solutions for each problem below are based on my experiences because I have successfully coded my own game's feel for its own inventory system: 1. How do I make it so that the inventory text appears whenever I press a key and then disappear after pressing the same key again. Peyton's demonstration makes it appear permanently. My solution: create an inventory UI sprite that's almost as big as the screen and make it an object and code its behavior where pressing a key makes it appear and disappear; try to put that code inside the obj_player. Then write a code in item manager object that whenever a key is pressed, the inventory text will co-appear with the inventory UI object you just made. 2. How do I convert Peyton's mouse prompts to just keyboard prompts when triggering items? My solution: go back to Peyton's previous video about creating the menu system and try your best to copy its fuctions while also translating them that best fits for specifically the inventory UI. Trust me, I learned it the hard way that way and it worked flawlessly. 3. How do I fix the annoying crashing that the item manage object makes? My solution: depends on what causes the crash. If it's like the "trying to delete font" crash, try deleting the code where we set the global font if you already have that code from the obj_settings (from Peyton's dialogue system video if you ever want obj_settings and obj_itemmanager to coexist in the main menu) and also try deleting the Clean Up event from obj_itemmanager if there's already one from the obj_settings. If it's like the "base index cannot be negative" crash, check if the item manager object is cloned or not. The cloned version of it is responsible for it so get rid of it!
Hi! would it be possible to elaborate on your solutions to 1&2? I'm experiencing the same problem and if you could share the code + location of the code that would be sooooo sooo so appreciated. I have watched the menu video but I still don't seem to be able to figure it out. Thank you so much :'(
I had no choice but to paste all of my codes here instead of in a link. Please adjust every code that fits your game's style; I gave you the main point for those 2 questions you have. Sorry for such a late reply.
@@deymitsjeym i wish i could show you the screenshot but it literally just says "i had no choice but ... so late." And no code, no 'see more' 😔 sorry if im bothering you but it's now showing up for some reason
Brother, you need to teach irl, it would help so many people. For my 2 years in programming yours are the clearest and most comprehensive videos I have ever seen
I am so glad I found these tutorials. Seeing these tutorials and learning so much so quick made me a million times more confident to start the official development of my horror RPG, Happyland. Thank you so much!!!
normally i would say this to every video that i like but this one is special, you really need more subs!! this tutorial was really great! it helped me alot
Thank you for this tutorial, i’ve been able to reverse engineering it to make it simillar to The Binding of Isaac mechanic. And it is working very well!!
Looking forward to more videos and to the release of your games. You're a great teacher and your art style, music, and color choices are all really appealing. Also, kinda have to put my vote in for an Earthbound-type video...
Great tutorial, I guess that I slidely edit this and use it to show current quests and other useful stuff. Btw, cant wait for Starcross Starcade Special to release!
awww and i JUST transferred everything to godot, though I'm still following this tutorial because your other videos helped me figure out design concepts a lot when i was working in gamemaker!
Here is the full code for dropping items, as in the video, it does not show you. It just deletes it. if mouse_check_button_pressed(mb_right) { with instance_create_depth(obj_player.x, obj_player.y, -y, obj_item_room) { item = other.inventory[other.selected_item]; } array_delete(inventory, selected_item, 1)
} This code will create an item object, assign its item value (using a with statement) then delete the inventory entry. Just be sure to program another check in your pickup script like keyboard_check_pressed(ord("E")) or else you will pick items up immediately upon dropping them, since youll be colliding with them as soon as they're created. Remember "with" statements run like you are programming in the object you're refrencing. So using other.inventory has to be used to modify the inventory managing object even if youre in its code block.
I love your videos! I'm starting gamemaker and I'm really glad to found your videos, it makes me start and I love that (Starcross Starcade Special looks really cool and I can't wait to play it!)
First of all this tutorial is amazing but I have a question about the code at around 40:54 what would the code be for the description to pop up if your in a room where you move around?
Thanks for this really helpful tutorial! Question, if you would like to make weapons that can be individually upgraded or renamed (meaning you can hold two of the same swords but one is upgraded by one level), how would you do it?
Tysm for help with inventory and all details explained with creating items! Most underrated channel. I will definitely add ur game to my wish list. But the question is when will u release that.
at 37:02 im getting the error "global variable name 'item_list' index (100024) not set before reading it. at gml_Object _obj_item_overworld_Create_0 (line -1)" Does anyone know why this is by chance?
Never thought about this buy glad you made the tutorial this was really awesome to create and implement, thanks! Also will you ever make a video on cutscenes or NPC's?
Hey Peyton, So I finished the tutorial! - Awesome btw! I'm just trying to add stacking to it right now and was hoping I could run something by you. I've added an amount to the constructor and then I added a 1 in the respective item struct for each item. Then in my draw event I loop through the inventory and draw the amount number beside each item. Where I'm having issues is my code for actually adding the item to the inventory, and if it's already in the inventory adding to the amount. This is my code in my step event for my burger item: if (place_meeting(x, y, obj_player)) { with (obj_item_manager) { for (var i = 0; i < array_length(inv); i++) { var arr = inv[| i]; if (arr[i] == item[i]) { item.burger.amount += 1; } else { item_add(item) instance_destroy(); } } } } Unfortunately, the result of this is that I walk over the item, and the item stays on the ground. It doesn't get added to the inventory or the count. Any thoughts?
I'm working on the same thing right now. It is a little misleading/frustrating that his Thumbnail shows a stacked item but the tutorial does not show how.
@@CMParks10 I couldn't get stacking working unfortunately no matter how many things I tried. Ended up having to use a ds_list system that I've got stacking to work in the past. Shame, because I really wanted to avoid that and use the array functions.
Hi, I just finished implementing this but how do you SAVE an array? I'm using a DS_MAP save system but I have no clue how I would save my games inventory now.
Followed your tutorials of this RPG series until here :D They are really good! I got a little question. I think you skipped the part how to set and draw the HP of the player (in the top right corner). I just can't make it look right by myself...( smol brain energy when it comes to coding) My number just keeps floating somewhere in the background of my map... rip :' )
I really like these tutorials and I have a suggestion! Could you make maybe a follow up video on how too make an item change your players sprite? Or anything’s sprite for that matter or maybe make like an item when you press it stays in your inventory but it makes a sound or something like a rubber chicken? You could still drop it but when u click on it instead of giving health or dropping and making an animation it just makes a sound in your inventory? Technically what I mentioned earlier about the changing the sprite would be like a armor system but it could be used for other reasons
I really enjoyed the video however is it possible to make a function that would search for if an item exists, like using an if statement for crafting or other things.
Thanks so much for this. I had always been overwhelmed by inventory systems. But this was so well done that I came away with so much a better understanding. Subbed n Liked.
Ey yo you got a discord or something? I'd love to show you something I'm working on if you're not horribly busy. I am a baby game maker i am shit at it lol
@@Willyboil Yo! Yeah there's a link to the discord in the description! Also, nowhere to support right now, but I'm releasing a game really soon and you can buy that if you want, you can also wishlist it on steam right now at store.steampowered.com/app/1748060/Starcross_Starcade_Special/!
hi! i was wondering if you could do a tutorial on how to make the player interact with stuff in gms2 (like sitting on a chair or pressing a certain button when close to an object to trigger the object to do something or picking things up etc.)
The dropping part is broken when i drop the items i cant pick up other items that are the same type as the one dropped , basically disables the entire inventory system also i can only select the item on the bottom of the list
Hello, I want to ask you something. I need your help. You developed a game called Rose of Starcross, right? How did you solve the jitter when going diagonally? It looked pretty smooth in your game. I couldn't solve it, can you help me?
Nice tutorial! Something that might be cool is if you could do an in-game currency tutorial- you totally don't have to, but I think it would be nice! :D
Hey! So this is a VERY good tutorial however, in my game I have a camera so that it moves when I move, and I added the code so that the icon moves with me however the button and text dont, could you please help with this and let me know on what code ill need to add for it to move with my player?
what I did is Create event: hp = 10 draw event: //draw_sprite(sprite_index,sprite_index,x,y) var _xx = camera_get_view_x(view_camera[0]) + 225; var _yy = camera_get_view_y(view_camera[0]) + 14; draw_text(_xx, _yy, hp) draw_text(_xx-25, _yy, "HP =") I did this in an object that only has this but you could probably put it in the player object or something
Sorry, one more quick question! How do you deal with room persistence? Do you just make the room persistant or do you have a fancier way of accomplishing it. I only ask because in your example, you collect all the keys open up all the doors and then when it’s time to leave the room, if you go back into the room everything is reset.
Thats something im considering covering in another video! Probably a saving/loading video. It can get a little bit more involved especially for bigger games so it was a bit out of the scope of this video!
Your tutorials are great and I've watched many of them. Thank you for your work. Also I'd like to point out an issue I've been struggling with for the last 2 days: I used you save and load system and everything works fine with the load room function, but for some reason when I use the function load game the inventory works fine except for the fact it doesn't seem to load the "effect" property of the objects loaded. Did anyone have the same issue?
Ok I fixed it 🤣 If anyone had the same issue here's my solution: in the object_list struct don't write your function. Write it somewhere else, like in a script, and under the "effect" property of the struct just put the name of the function without "()". Then in the step event of the item manager, under the mouse click trigger, just write "script_exectute(inventory_array[selected_item].effect). I realised game maker won't save your function to the json file, so when you load the json file you would not have an "effect" property for the items you loaded, but you can store an id, in this case the function's name. So when you need to run the function relative to the effect you click on, just run script_execute(function id). I hope this makes sense, English is not my fist language ☺
@@_gheo YOU, SIR! You are the REAL MVP. I can not decribe how thankfull i am right in this moment! I was desperating the last hours, struggling with tutorial after tutorial and YOU gave me the solution. THANK YOU so much!!
I just started with GameMaker after losing faith in Unity, so I'm following your videos which are great. But can I ask you a question? How can I save the inventory if there are functions inside? Anyway I love you
thank you so much for the tutorial, i learned so much from some of your tutorials, but i was wondering if you can make a video how to make an inventory system like Undertale.
Thank you for another helpful video, but may I ask, how would it be possible so that interacting with the item opens a dialogue (something like "There is an item here, take it?" and then yes/no options) and then only after selecting yes does the item get added to your inventory and removed from the environment? I've followed the dialogue tutorial series, and im having difficulty blending the two mechanics
I’m currently struggling with coming up with my own item system because the way I’m attempting to do it is to use structs for items. Using an item constructor I have my struct of pizza. But if I want to use a different item I have to rewrite all the code for pizza but for that new item. So my current problem is trying to find a way to get a struct that you don’t know the name of to use the item in the menu of a certain position. This tutorial is pretty good and I might even use some of the code for my game, but for what I’m making it’s not gonna help with my problem unless theres a different way of solving this.
Great video! I'm assuming you would have a similar setup for equipping items(Weapons or Armour) by having a separate equipment manager object that reads from the item manager?
Awesome tutorial, as always! might sound stupid but just wanted to make sure : is the code you teach us in your tutorials what people call GML ? So that i can try to find ressources to learn it a bit more and understand everything fully!
I followed this tutorial and it works amazing! I now want to make a separate inventory using the same system (one for resources and one for useable items). I tried making a resource manager using the same code, but no matter what variables I change I can’t get it to work. Any resource object I create appears under my items and acts as if it’s part of the item manager. What’s the best way to add a second inventory (of sorts)?
HELP! I know this is an old video now. But How do I save the array(struct) and then load it back, you can not save structsa that contains functions, atleas I dont know how to do that.
ran into an issue where when i pick up all the items in one room it crashes the game with the error message “unable to find any instance for object index ‘0’ name ‘o_item_overworld’ it’s telling me that this issue happens at line 7 of my item manager step event but i don’t see what could be going wrong this is before I’ve set a limit to the inventory any pointers?
the code at line 7 is: if mouse_x > _xx && mouse_x < (_xx + o_item_overworld.sprite_width) && mouse_y > _yy && mouse_y < (_yy + o_item_overworld.sprite_height) { i wrote it this way in case I decided to add items later with sprites bigger that 8 x 8, but right now all my “test items” are just burgers as shown in the video
Great! but something that confuses me is why dont you draw the inventory in the GUI draw event instead of the normal draw event? Is there a disadvantage of using the GUI draw event?
At the beginning when he starts coding for the draw he's popping a message in the screen that says that he did a mistake and instead of having draw gui he had draw
i've never been more excited seeing a programming tutorial xd
Ppl can make full games with just your tutorials. Very helpful😊
I almost never comment on videos... but brother, the style in which you do a tutorial is like being in a 1 to 1 classroom. You explain everything brilliantly and dont rush a thing. I love the way you show us the how to do something firsty, then show us how to streamline it. Amazing work and thank you!
Thank you so much for making these videos. Everytime you upload it makes my week! They're so easy and relaxing to follow, it makes coding not as daunting. It's made learning a much more smooth and enjoyable time for me. Thank you sm for all the effort you put into these gems 💖
Thank you so much! I'm so glad it's making dev easier for you!
@@peytonburnham4316 please never stop making these amazing videos! Could you maybe make a tutorial video on how to trigger a battle by talking to an npc like in pokemon?
THANK YOU FOR THIS!!! Such a coincidence that today I was gonna work on my inventory for my game!! Ive been watching your videos to help create my game and they’ve helped me a lot!!😭💕💕 I just started coding like two months ago and your tutorials has saved me
PLEASE do a tutorial for an Earthbound-like battle system. That would be amazing!
Combat systems are a forbidden tutorial... thats why no ytbr takes their series into a turn based system
@@JessieProductions that would be pretty awesome!
@@joshua7426 Shaun Spaulding should be making one soon
@@JessieProductions did you do it?👀
@@saxenart i was working on it, but i eventually had to stop to focus on other projects. in the future i hope to make an rpg game, so in the far future i might make a tutorial lol
Alright guys, here me out. You might have one of these questions in your head about this video. The solutions for each problem below are based on my experiences because I have successfully coded my own game's feel for its own inventory system:
1. How do I make it so that the inventory text appears whenever I press a key and then disappear after pressing the same key again. Peyton's demonstration makes it appear permanently.
My solution: create an inventory UI sprite that's almost as big as the screen and make it an object and code its behavior where pressing a key makes it appear and disappear; try to put that code inside the obj_player. Then write a code in item manager object that whenever a key is pressed, the inventory text will co-appear with the inventory UI object you just made.
2. How do I convert Peyton's mouse prompts to just keyboard prompts when triggering items?
My solution: go back to Peyton's previous video about creating the menu system and try your best to copy its fuctions while also translating them that best fits for specifically the inventory UI. Trust me, I learned it the hard way that way and it worked flawlessly.
3. How do I fix the annoying crashing that the item manage object makes?
My solution: depends on what causes the crash. If it's like the "trying to delete font" crash, try deleting the code where we set the global font if you already have that code from the obj_settings (from Peyton's dialogue system video if you ever want obj_settings and obj_itemmanager to coexist in the main menu) and also try deleting the Clean Up event from obj_itemmanager if there's already one from the obj_settings.
If it's like the "base index cannot be negative" crash, check if the item manager object is cloned or not. The cloned version of it is responsible for it so get rid of it!
Hi! would it be possible to elaborate on your solutions to 1&2? I'm experiencing the same problem and if you could share the code + location of the code that would be sooooo sooo so appreciated. I have watched the menu video but I still don't seem to be able to figure it out. Thank you so much :'(
I had no choice but to paste all of my codes here instead of in a link. Please adjust every code that fits your game's style; I gave you the main point for those 2 questions you have. Sorry for such a late reply.
@@deymitsjeym Hey! Where did you paste the code??
@@mackenzieyang6380 the codes are literally in my first reply; it's a wall of text
@@deymitsjeym i wish i could show you the screenshot but it literally just says "i had no choice but ... so late." And no code, no 'see more' 😔 sorry if im bothering you but it's now showing up for some reason
bro ur tutorials helps SOOO MUCH please keep up with the awesome work!! Stay Safe and greetings from Brazil!
Thank you so much!!
Brother, you need to teach irl, it would help so many people. For my 2 years in programming yours are the clearest and most comprehensive videos I have ever seen
This is such an amazing and perfect tutorial it really helped me so much
I wish you make another episode where we can make items stackable
I’ve been following your tutorials and I’m on the dialogue system one I can’t wait to get to this one
Thank you so much this is such a nice Help to start and understanding Programming in Gamemaker. I am glad there is people like you in this world.
One hour tutorial video ?
HYPE
I've been putting off an inventory system for a while. Perfect timing for the vid.
This is the best guide I've ever seen, and you are the best teacher I've ever met!
New video? And it’s on my birthday? This is amazing
Happy birthday 😎
@@peytonburnham4316 Thanks :)
I am so glad I found these tutorials. Seeing these tutorials and learning so much so quick made me a million times more confident to start the official development of my horror RPG, Happyland. Thank you so much!!!
thank you a lot!! i really appreciate your hardwork, but its still really hard for me, but anyways, you have the best tutorials!!
That's amazing, i really hoped this tutorial would come soon, i just have to tweak some coding and i'm ready to go, thank you so much Peyton!
normally i would say this to every video that i like but this one is special, you really need more subs!! this tutorial was really great! it helped me alot
✋The day has come🤚 Peyton has produced another tutorial 😩😩 Thank you for real
Thank you for this tutorial, i’ve been able to reverse engineering it to make it simillar to The Binding of Isaac mechanic. And it is working very well!!
Yo another tutorial! Thanks for the amazing work!
Looking forward to more videos and to the release of your games. You're a great teacher and your art style, music, and color choices are all really appealing.
Also, kinda have to put my vote in for an Earthbound-type video...
Oh my god I love you. I was hoping for something like this from you. Easy to understand and useful. Thanks a lot!
"burger belongs to no one."
Gotta be in the top 10 things I've ever heard.
Great tutorial, I guess that I slidely edit this and use it to show current quests and other useful stuff. Btw, cant wait for Starcross Starcade Special to release!
I've been needing this tutorial for a long time now lol, could you do a saving/loading tutorial next?
Definitely planning on doing one!
Look at this guy, delivering ua-cam.com/video/muCvAmFmUXk/v-deo.html
Good stuff, glad someone made this for game maker.
awww and i JUST transferred everything to godot, though I'm still following this tutorial because your other videos helped me figure out design concepts a lot when i was working in gamemaker!
Here is the full code for dropping items, as in the video, it does not show you. It just deletes it.
if mouse_check_button_pressed(mb_right)
{
with instance_create_depth(obj_player.x, obj_player.y, -y, obj_item_room)
{
item = other.inventory[other.selected_item];
}
array_delete(inventory, selected_item, 1)
}
This code will create an item object, assign its item value (using a with statement) then delete the inventory entry. Just be sure to program another check in your pickup script like keyboard_check_pressed(ord("E")) or else you will pick items up immediately upon dropping them, since youll be colliding with them as soon as they're created.
Remember "with" statements run like you are programming in the object you're refrencing. So using other.inventory has to be used to modify the inventory managing object even if youre in its code block.
im too lazy to put another check, so would it still work if i offset the x or y a little so it wouldn't immediately grt picked up?
Thank you so much!!! This tutorial is going to help me a lot with my game project!!!
I love your videos! I'm starting gamemaker and I'm really glad to found your videos, it makes me start and I love that (Starcross Starcade Special looks really cool and I can't wait to play it!)
WHY IS MY POCKET SOO HEAVY, HEL-
*crushed
😎
How do I keep track of how many items of the same kind? Many times, same items take up the same inventory slot
First of all this tutorial is amazing but I have a question about the code at around 40:54 what would the code be for the description to pop up if your in a room where you move around?
Same as with the other stuff! Make sure you use “camera_get_view_x(view_camera[0])” and the y version of that function!
@@peytonburnham4316 Thank you so much!
Woah this is very useful thanks for the tutorial
Glad it was helpful!
Amazing tutorials. Ive never seen this quality channel before. Thank you 😀
What i was waiting for 😀, keep going !
Thanks for this really helpful tutorial!
Question, if you would like to make weapons that can be individually upgraded or renamed (meaning you can hold two of the same swords but one is upgraded by one level), how would you do it?
Tysm for help with inventory and all details explained with creating items! Most underrated channel. I will definitely add ur game to my wish list. But the question is when will u release that.
at 37:02 im getting the error "global variable name 'item_list' index (100024) not set before reading it. at gml_Object _obj_item_overworld_Create_0 (line -1)"
Does anyone know why this is by chance?
same :/
Never thought about this buy glad you made the tutorial this was really awesome to create and implement, thanks! Also will you ever make a video on cutscenes or NPC's?
*^saves to my game design playlist**
help at 52:27 my script doesnt work i have everything like you but it gives me an "assignment operator expected" error
El mejor tutorial explicado....eres el mejor...sigue asi
Hey Peyton,
So I finished the tutorial! - Awesome btw! I'm just trying to add stacking to it right now and was hoping I could run something by you. I've added an amount to the constructor and then I added a 1 in the respective item struct for each item. Then in my draw event I loop through the inventory and draw the amount number beside each item.
Where I'm having issues is my code for actually adding the item to the inventory, and if it's already in the inventory adding to the amount. This is my code in my step event for my burger item:
if (place_meeting(x, y, obj_player))
{
with (obj_item_manager)
{
for (var i = 0; i < array_length(inv); i++)
{
var arr = inv[| i];
if (arr[i] == item[i])
{
item.burger.amount += 1;
} else {
item_add(item)
instance_destroy();
}
}
}
}
Unfortunately, the result of this is that I walk over the item, and the item stays on the ground. It doesn't get added to the inventory or the count. Any thoughts?
I'm working on the same thing right now. It is a little misleading/frustrating that his Thumbnail shows a stacked item but the tutorial does not show how.
@@CMParks10 I couldn't get stacking working unfortunately no matter how many things I tried. Ended up having to use a ds_list system that I've got stacking to work in the past. Shame, because I really wanted to avoid that and use the array functions.
Hi, I just finished implementing this but how do you SAVE an array?
I'm using a DS_MAP save system but I have no clue how I would save my games inventory now.
Followed your tutorials of this RPG series until here :D They are really good! I got a little question.
I think you skipped the part how to set and draw the HP of the player (in the top right corner).
I just can't make it look right by myself...( smol brain energy when it comes to coding)
My number just keeps floating somewhere in the background of my map... rip :' )
Can you save and load this inventory system?
I really like these tutorials and I have a suggestion!
Could you make maybe a follow up video on how too make an item change your players sprite? Or anything’s sprite for that matter or maybe make like an item when you press it stays in your inventory but it makes a sound or something like a rubber chicken? You could still drop it but when u click on it instead of giving health or dropping and making an animation it just makes a sound in your inventory? Technically what I mentioned earlier about the changing the sprite would be like a armor system but it could be used for other reasons
I really enjoyed the video however is it possible to make a function that would search for if an item exists, like using an if statement for crafting or other things.
Oh yeah, I LOVE YOUR STUFF 😩😩
Thanks so much for this. I had always been overwhelmed by inventory systems. But this was so well done that I came away with so much a better understanding. Subbed n Liked.
In 18:00 , The “ burger text “ doesn’t appear, even though I exactly followed the video with no mistakes at all. Why is that?
use draw GUI event, instead of normal draw event
I’m pretty pumped for this tutorial!! Just wondering if you go over item stacking at all..?
No item stacking directly but I go over a few methods for different concepts in this video that could be applied to that idea!
Nice! - Also just curious if this system would be adaptable for using up/down keyboard arrows for selecting and enter for using rather than mouse use?
@@digitalswordplay Yeah, you could use some of the things from the menu system video
@@sooperjay do you know how to SPECIFICALLY do that? i really want to add this to my system..
@@shardofgems5603yeah im stuck there too
I'll buy this game as soon as it's out.
I was literally looking for that
Hey, can you tell us how to add the actual HP display that the values are going into? :)
Bro you are amazing i love your channel thank you so much
Ey yo you got a discord or something? I'd love to show you something I'm working on if you're not horribly busy. I am a baby game maker i am shit at it lol
also can i support you on patreon or anywhere also do you need anyone to playtest for you?
@@Willyboil Yo! Yeah there's a link to the discord in the description! Also, nowhere to support right now, but I'm releasing a game really soon and you can buy that if you want, you can also wishlist it on steam right now at store.steampowered.com/app/1748060/Starcross_Starcade_Special/!
extremely helpful, thanks for making these.🤗
hi! i was wondering if you could do a tutorial on how to make the player interact with stuff in gms2 (like sitting on a chair or pressing a certain button when close to an object to trigger the object to do something or picking things up etc.)
Do your part.
Comment for the algorithm.
It would be awesome if you can expand on this system adding a way to save it and load it
How would I store different values from the same items? for example one bomb does 5 damage and another does 10 damage.
The dropping part is broken when i drop the items i cant pick up other items that are the same type as the one dropped
, basically disables the entire inventory system also i can only select the item on the bottom of the list
This is awesome
Amazing tutorials. Thank you!
is there a way i could make it that instead of clicking the item to use it i use the arrow keys and "z" key?
Hello, I want to ask you something. I need your help. You developed a game called Rose of Starcross, right? How did you solve the jitter when going diagonally? It looked pretty smooth in your game. I couldn't solve it, can you help me?
He probably made a manual camera instead of using the default one. Pretty sure shaun spalding made a easy tutorial about how to make one
Nice tutorial! Something that might be cool is if you could do an in-game currency tutorial- you totally don't have to, but I think it would be nice! :D
Hey! So this is a VERY good tutorial however, in my game I have a camera so that it moves when I move, and I added the code so that the icon moves with me however the button and text dont, could you please help with this and let me know on what code ill need to add for it to move with my player?
i had to change from draw event to draw GUI event, hopes this helps! ( sorry for late respond)
Thank you, very helpful!! could you go over how to drop that same item?
Awesome content!
Love this tutorial. It really eased the load off my shoulder. But is there a way to make the inventory stack?
Nice tutorial 👍
ayyy ur tutorials are pretty helpful, when are ya guna do a tutorial on battle systems POV/Mario & Luigi styled
You probably won't answer but for the dropping items can you also make the item reappear on the floor?
ITEM SYSTEM YOOOOOOOOOOOOOOOOOOOOOOOOO
question: can get items in the options boxes from the textbox?
clarification: nay nay soldier boy up in that ohhhhh
Hi, nice tutorial! but how did you made that hp indicator
what I did is
Create event:
hp = 10
draw event:
//draw_sprite(sprite_index,sprite_index,x,y)
var _xx = camera_get_view_x(view_camera[0]) + 225;
var _yy = camera_get_view_y(view_camera[0]) + 14;
draw_text(_xx, _yy, hp)
draw_text(_xx-25, _yy, "HP =")
I did this in an object that only has this but you could probably put it in the player object or something
you also may need to do some tweaking depending on your font
Sorry, one more quick question! How do you deal with room persistence? Do you just make the room persistant or do you have a fancier way of accomplishing it. I only ask because in your example, you collect all the keys open up all the doors and then when it’s time to leave the room, if you go back into the room everything is reset.
Thats something im considering covering in another video! Probably a saving/loading video. It can get a little bit more involved especially for bigger games so it was a bit out of the scope of this video!
Is there a way to save and load this type of inventory?
Your tutorials are great and I've watched many of them. Thank you for your work.
Also I'd like to point out an issue I've been struggling with for the last 2 days: I used you save and load system and everything works fine with the load room function, but for some reason when I use the function load game the inventory works fine except for the fact it doesn't seem to load the "effect" property of the objects loaded. Did anyone have the same issue?
Ok I fixed it 🤣 If anyone had the same issue here's my solution: in the object_list struct don't write your function. Write it somewhere else, like in a script, and under the "effect" property of the struct just put the name of the function without "()". Then in the step event of the item manager, under the mouse click trigger, just write "script_exectute(inventory_array[selected_item].effect).
I realised game maker won't save your function to the json file, so when you load the json file you would not have an "effect" property for the items you loaded, but you can store an id, in this case the function's name. So when you need to run the function relative to the effect you click on, just run script_execute(function id).
I hope this makes sense, English is not my fist language ☺
@@_gheo YOU, SIR! You are the REAL MVP. I can not decribe how thankfull i am right in this moment!
I was desperating the last hours, struggling with tutorial after tutorial and YOU gave me the solution.
THANK YOU so much!!
@@furbyteaspoon4091 the real MVP is mr Peyton for coming up with the system, but I'm glad I could help 🥰❤️
How would I go about making the item show up on the ground after dropping it?
I just started with GameMaker after losing faith in Unity, so I'm following your videos which are great. But can I ask you a question? How can I save the inventory if there are functions inside? Anyway I love you
thank you so much for the tutorial, i learned so much from some of your tutorials, but i was wondering if you can make a video how to make an inventory system like Undertale.
Thank you for another helpful video, but may I ask, how would it be possible so that interacting with the item opens a dialogue (something like "There is an item here, take it?" and then yes/no options) and then only after selecting yes does the item get added to your inventory and removed from the environment? I've followed the dialogue tutorial series, and im having difficulty blending the two mechanics
hey, i know this is very late, but heres how i did it!
in my game text script i added this:
case "item_test_1":
scr_text("> There's a pocket knife here, do you want to take it?");
scr_options("Yes", "item_test_1-yes");
scr_options("No", "item_test_1-no");
break;
case "item_test_1-yes":
inv_add(global.item_list.pocket_knife);
instance_destroy(obj_item_ingame);
scr_text("> You got the pocket knife.")
break;
case "item_test_1-no":
scr_text("> You left the pocket knife...")
@@kittycitykatOH thx very much bro, I create crazy things and nothing helped me
I’m currently struggling with coming up with my own item system because the way I’m attempting to do it is to use structs for items. Using an item constructor I have my struct of pizza. But if I want to use a different item I have to rewrite all the code for pizza but for that new item. So my current problem is trying to find a way to get a struct that you don’t know the name of to use the item in the menu of a certain position. This tutorial is pretty good and I might even use some of the code for my game, but for what I’m making it’s not gonna help with my problem unless theres a different way of solving this.
how do i make the items stack?? can someone pls explain
awesome tutorial
Very late but how would you reference items like:
if place_meeting(x, y, obj_button)
{
(add a green key to your inventory)/how would you do this?
}
Great video! I'm assuming you would have a similar setup for equipping items(Weapons or Armour) by having a separate equipment manager object that reads from the item manager?
Awesome tutorial, as always! might sound stupid but just wanted to make sure : is the code you teach us in your tutorials what people call GML ? So that i can try to find ressources to learn it a bit more and understand everything fully!
@Rock-Kun oh ok thank you!!
I followed this tutorial and it works amazing! I now want to make a separate inventory using the same system (one for resources and one for useable items). I tried making a resource manager using the same code, but no matter what variables I change I can’t get it to work.
Any resource object I create appears under my items and acts as if it’s part of the item manager. What’s the best way to add a second inventory (of sorts)?
HELP! I know this is an old video now. But How do I save the array(struct) and then load it back, you can not save structsa that contains functions, atleas I dont know how to do that.
thanks you for this video it was extremly helpfull !
You're the GOAT!
ran into an issue where when i pick up all the items in one room it crashes the game with the error message “unable to find any instance for object index ‘0’ name ‘o_item_overworld’
it’s telling me that this issue happens at line 7 of my item manager step event but i don’t see what could be going wrong
this is before I’ve set a limit to the inventory
any pointers?
the code at line 7 is:
if mouse_x > _xx && mouse_x < (_xx + o_item_overworld.sprite_width) && mouse_y > _yy && mouse_y < (_yy + o_item_overworld.sprite_height) {
i wrote it this way in case I decided to add items later with sprites bigger that 8 x 8, but right now all my “test items” are just burgers as shown in the video
Great! but something that confuses me is why dont you draw the inventory in the GUI draw event instead of the normal draw event? Is there a disadvantage of using the GUI draw event?
At the beginning when he starts coding for the draw he's popping a message in the screen that says that he did a mistake and instead of having draw gui he had draw
Would creating an object with global struct in the initialization room be a good way of tracking player level, health etc. ?