Full Item and Item Inventory System in GMS2!

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ •

  • @AymenZero
    @AymenZero 3 роки тому +7

    i've never been more excited seeing a programming tutorial xd

  • @FeliJj
    @FeliJj Місяць тому +1

    Ppl can make full games with just your tutorials. Very helpful😊

  • @Superiiorz
    @Superiiorz Рік тому +2

    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!

  • @sambrott8391
    @sambrott8391 3 роки тому +30

    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
      @peytonburnham4316  3 роки тому +11

      Thank you so much! I'm so glad it's making dev easier for you!

    • @saxenart
      @saxenart Рік тому +2

      @@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?

  • @icyicinq
    @icyicinq 3 роки тому +11

    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

  • @MZMDev
    @MZMDev 3 роки тому +80

    PLEASE do a tutorial for an Earthbound-like battle system. That would be amazing!

    • @joshua7426
      @joshua7426 2 роки тому +8

      Combat systems are a forbidden tutorial... thats why no ytbr takes their series into a turn based system

    • @joshua7426
      @joshua7426 2 роки тому +3

      @@JessieProductions that would be pretty awesome!

    • @XeroKaos
      @XeroKaos 2 роки тому +3

      @@joshua7426 Shaun Spaulding should be making one soon

    • @saxenart
      @saxenart Рік тому +1

      @@JessieProductions did you do it?👀

    • @JessieProductions
      @JessieProductions Рік тому

      @@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

  • @deymitsjeym
    @deymitsjeym 2 роки тому +19

    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!

    • @mackenzieyang6380
      @mackenzieyang6380 2 роки тому

      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 :'(

    • @deymitsjeym
      @deymitsjeym 2 роки тому

      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.

    • @mackenzieyang6380
      @mackenzieyang6380 2 роки тому

      @@deymitsjeym Hey! Where did you paste the code??

    • @deymitsjeym
      @deymitsjeym 2 роки тому

      @@mackenzieyang6380 the codes are literally in my first reply; it's a wall of text

    • @mackenzieyang6380
      @mackenzieyang6380 2 роки тому

      @@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

  • @nakd_baby5932
    @nakd_baby5932 3 роки тому +6

    bro ur tutorials helps SOOO MUCH please keep up with the awesome work!! Stay Safe and greetings from Brazil!

  • @ビーンバンデット52
    @ビーンバンデット52 3 місяці тому

    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

  • @HAnd_Axm
    @HAnd_Axm 5 місяців тому +1

    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

  • @Deus_XG
    @Deus_XG 3 роки тому +6

    I’ve been following your tutorials and I’m on the dialogue system one I can’t wait to get to this one

  • @frogleap9316
    @frogleap9316 11 місяців тому +1

    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.

  • @daltonpavesi3009
    @daltonpavesi3009 3 роки тому +2

    One hour tutorial video ?
    HYPE

  • @sirguamsalot
    @sirguamsalot 3 роки тому +1

    I've been putting off an inventory system for a while. Perfect timing for the vid.

  • @byy4721
    @byy4721 11 днів тому

    This is the best guide I've ever seen, and you are the best teacher I've ever met!

  • @ItsTheMagicMelon
    @ItsTheMagicMelon 3 роки тому +2

    New video? And it’s on my birthday? This is amazing

  • @MercyArtsUSA
    @MercyArtsUSA 3 роки тому +3

    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!!!

  • @smartidiots1
    @smartidiots1 10 місяців тому +3

    thank you a lot!! i really appreciate your hardwork, but its still really hard for me, but anyways, you have the best tutorials!!

  • @arthurs.7741
    @arthurs.7741 3 роки тому +5

    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!

  • @flashtag2022
    @flashtag2022 2 роки тому +1

    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

  • @angrysoybeanfarmer3453
    @angrysoybeanfarmer3453 3 роки тому +1

    ✋The day has come🤚 Peyton has produced another tutorial 😩😩 Thank you for real

  • @blob693
    @blob693 2 місяці тому +1

    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!!

  • @WrighteousVR
    @WrighteousVR 3 роки тому +3

    Yo another tutorial! Thanks for the amazing work!

  • @Orobolus_Outline
    @Orobolus_Outline 2 роки тому +2

    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...

  • @downthispath6538
    @downthispath6538 3 роки тому +1

    Oh my god I love you. I was hoping for something like this from you. Easy to understand and useful. Thanks a lot!

  • @RigelRat
    @RigelRat 6 місяців тому +4

    "burger belongs to no one."
    Gotta be in the top 10 things I've ever heard.

  • @justshark7612
    @justshark7612 2 роки тому +1

    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!

  • @LillyEve
    @LillyEve 3 роки тому +4

    I've been needing this tutorial for a long time now lol, could you do a saving/loading tutorial next?

    • @peytonburnham4316
      @peytonburnham4316  3 роки тому +5

      Definitely planning on doing one!

    • @applebard
      @applebard 2 роки тому

      Look at this guy, delivering ua-cam.com/video/muCvAmFmUXk/v-deo.html

  • @StallionTG
    @StallionTG 3 роки тому +1

    Good stuff, glad someone made this for game maker.

  • @sharkkedy
    @sharkkedy 3 роки тому +8

    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!

  • @johnnyfesscakes3405
    @johnnyfesscakes3405 2 роки тому +24

    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.

    • @Darrk_77
      @Darrk_77 2 роки тому

      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?

  • @SouryaLeFunentoi
    @SouryaLeFunentoi 3 роки тому +2

    Thank you so much!!! This tutorial is going to help me a lot with my game project!!!

  • @shaco_dev
    @shaco_dev Рік тому

    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!)

  • @ssharkiggo6432
    @ssharkiggo6432 3 роки тому +9

    WHY IS MY POCKET SOO HEAVY, HEL-
    *crushed

  • @PositivelyBrainwashed
    @PositivelyBrainwashed Рік тому +2

    How do I keep track of how many items of the same kind? Many times, same items take up the same inventory slot

  • @gregethgeist
    @gregethgeist 3 роки тому +3

    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?

    • @peytonburnham4316
      @peytonburnham4316  3 роки тому +3

      Same as with the other stuff! Make sure you use “camera_get_view_x(view_camera[0])” and the y version of that function!

    • @gregethgeist
      @gregethgeist 3 роки тому +2

      @@peytonburnham4316 Thank you so much!

  • @ferociousspy9590
    @ferociousspy9590 3 роки тому +2

    Woah this is very useful thanks for the tutorial

  • @서울에서의위시리스트
    @서울에서의위시리스트 3 роки тому

    Amazing tutorials. Ive never seen this quality channel before. Thank you 😀

  • @TMasterGamss
    @TMasterGamss 3 роки тому +1

    What i was waiting for 😀, keep going !

  • @retronimus
    @retronimus 8 місяців тому +1

    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?

  • @marde8025
    @marde8025 2 роки тому

    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.

  • @sethanderson9719
    @sethanderson9719 2 роки тому +3

    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?

  • @haise_mix
    @haise_mix 3 роки тому +3

    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?

  • @ThomasFoolery
    @ThomasFoolery 3 роки тому +2

    *^saves to my game design playlist**

  • @Mikus440
    @Mikus440 2 місяці тому +1

    help at 52:27 my script doesnt work i have everything like you but it gives me an "assignment operator expected" error

  • @Codificador_9999
    @Codificador_9999 10 місяців тому +1

    El mejor tutorial explicado....eres el mejor...sigue asi

  • @digitalswordplay
    @digitalswordplay 3 роки тому +4

    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?

    • @CMParks10
      @CMParks10 2 роки тому +2

      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.

    • @digitalswordplay
      @digitalswordplay 2 роки тому +1

      @@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.

  • @Etsa
    @Etsa 2 роки тому +2

    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.

  • @SweetJiJiSama
    @SweetJiJiSama 3 роки тому +7

    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 :' )

  • @Chris_M_Romero
    @Chris_M_Romero Рік тому +6

    Can you save and load this inventory system?

  • @dawaysss7987
    @dawaysss7987 3 роки тому +1

    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

  • @WrayvenGaming
    @WrayvenGaming Рік тому +2

    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.

  • @spinielgeckodin3321
    @spinielgeckodin3321 3 роки тому +1

    Oh yeah, I LOVE YOUR STUFF 😩😩

  • @meganoob9281
    @meganoob9281 2 роки тому

    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.

  • @CioAyron
    @CioAyron Рік тому +1

    In 18:00 , The “ burger text “ doesn’t appear, even though I exactly followed the video with no mistakes at all. Why is that?

    • @KokomiFish0
      @KokomiFish0 7 місяців тому +1

      use draw GUI event, instead of normal draw event

  • @digitalswordplay
    @digitalswordplay 3 роки тому +2

    I’m pretty pumped for this tutorial!! Just wondering if you go over item stacking at all..?

    • @peytonburnham4316
      @peytonburnham4316  3 роки тому +2

      No item stacking directly but I go over a few methods for different concepts in this video that could be applied to that idea!

    • @digitalswordplay
      @digitalswordplay 3 роки тому +2

      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?

    • @sooperjay
      @sooperjay 3 роки тому +2

      @@digitalswordplay Yeah, you could use some of the things from the menu system video

    • @shardofgems5603
      @shardofgems5603 3 роки тому +1

      @@sooperjay do you know how to SPECIFICALLY do that? i really want to add this to my system..

    • @relaxolotlgames6460
      @relaxolotlgames6460 9 місяців тому

      @@shardofgems5603yeah im stuck there too

  • @Etsa
    @Etsa 2 роки тому

    I'll buy this game as soon as it's out.

  • @biue1055
    @biue1055 3 роки тому +2

    I was literally looking for that

  • @MA-ti4og
    @MA-ti4og 2 роки тому +2

    Hey, can you tell us how to add the actual HP display that the values are going into? :)

  • @Willyboil
    @Willyboil 3 роки тому +3

    Bro you are amazing i love your channel thank you so much

    • @Willyboil
      @Willyboil 3 роки тому

      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
      @Willyboil 3 роки тому +1

      also can i support you on patreon or anywhere also do you need anyone to playtest for you?

    • @peytonburnham4316
      @peytonburnham4316  3 роки тому +1

      @@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/!

  • @vela7358
    @vela7358 2 роки тому

    extremely helpful, thanks for making these.🤗

  • @NavaSalehi-h5z
    @NavaSalehi-h5z Місяць тому

    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.)

  • @Dark_Peace
    @Dark_Peace 3 роки тому +5

    Do your part.
    Comment for the algorithm.

  • @Chris_M_Romero
    @Chris_M_Romero Рік тому +2

    It would be awesome if you can expand on this system adding a way to save it and load it

  • @theharvestfloor1
    @theharvestfloor1 2 роки тому +1

    How would I store different values from the same items? for example one bomb does 5 damage and another does 10 damage.

  • @justachipofftheiceberg6313
    @justachipofftheiceberg6313 11 місяців тому +1

    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

  • @macklinmusic
    @macklinmusic 3 роки тому +1

    This is awesome

  • @spiritgame6259
    @spiritgame6259 2 роки тому

    Amazing tutorials. Thank you!

  • @parakeetbudgie4245
    @parakeetbudgie4245 Рік тому +1

    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?

  • @mehmetyigitkeskin5049
    @mehmetyigitkeskin5049 2 роки тому +3

    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?

    • @asddsadsad-b8b
      @asddsadsad-b8b Рік тому +1

      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

  • @plagueparchments
    @plagueparchments 2 роки тому

    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

  • @SammLIVEYT
    @SammLIVEYT 11 місяців тому +1

    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?

    • @KokomiFish0
      @KokomiFish0 7 місяців тому

      i had to change from draw event to draw GUI event, hopes this helps! ( sorry for late respond)

  • @OmarCanaday
    @OmarCanaday Рік тому

    Thank you, very helpful!! could you go over how to drop that same item?

  • @mehmetyigitkeskin5049
    @mehmetyigitkeskin5049 3 роки тому +1

    Awesome content!

  • @LordGabe_7
    @LordGabe_7 7 місяців тому

    Love this tutorial. It really eased the load off my shoulder. But is there a way to make the inventory stack?

  • @nickboss5544
    @nickboss5544 3 роки тому +1

    Nice tutorial 👍

  • @peeposki
    @peeposki 2 роки тому +1

    ayyy ur tutorials are pretty helpful, when are ya guna do a tutorial on battle systems POV/Mario & Luigi styled

  • @NinjafoxYT791
    @NinjafoxYT791 5 місяців тому

    You probably won't answer but for the dropping items can you also make the item reappear on the floor?

  • @orangeyeez
    @orangeyeez 3 роки тому +2

    ITEM SYSTEM YOOOOOOOOOOOOOOOOOOOOOOOOO
    question: can get items in the options boxes from the textbox?

  • @k1ng.Gaming
    @k1ng.Gaming 2 роки тому +3

    Hi, nice tutorial! but how did you made that hp indicator

    • @ReiOfSunshine05
      @ReiOfSunshine05 2 роки тому

      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

    • @ReiOfSunshine05
      @ReiOfSunshine05 2 роки тому +1

      you also may need to do some tweaking depending on your font

  • @digitalswordplay
    @digitalswordplay 3 роки тому +1

    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.

    • @peytonburnham4316
      @peytonburnham4316  3 роки тому +4

      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!

  • @crygor_3307
    @crygor_3307 2 роки тому +1

    Is there a way to save and load this type of inventory?

  • @_gheo
    @_gheo Рік тому +1

    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?

    • @_gheo
      @_gheo Рік тому +3

      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 ☺

    • @furbyteaspoon4091
      @furbyteaspoon4091 5 місяців тому +1

      @@_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!!

    • @_gheo
      @_gheo 5 місяців тому +1

      @@furbyteaspoon4091 the real MVP is mr Peyton for coming up with the system, but I'm glad I could help 🥰❤️

  • @haveaseatstranger9055
    @haveaseatstranger9055 2 роки тому +1

    How would I go about making the item show up on the ground after dropping it?

  • @mariomatupokl2986
    @mariomatupokl2986 Рік тому

    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

  • @AlrhadenJavier
    @AlrhadenJavier 2 роки тому +1

    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.

  • @thegoatishere5131
    @thegoatishere5131 2 роки тому +1

    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

    • @kittycitykat
      @kittycitykat Рік тому +4

      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...")

    • @w3irllomusic
      @w3irllomusic 11 місяців тому

      ​​@@kittycitykatOH thx very much bro, I create crazy things and nothing helped me

  • @DJaycerOfficial
    @DJaycerOfficial Рік тому

    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.

  • @matthedoubleu4417
    @matthedoubleu4417 Місяць тому +1

    how do i make the items stack?? can someone pls explain

  • @ksioncdesign7075
    @ksioncdesign7075 2 роки тому

    awesome tutorial

  • @jazzyfaye6976
    @jazzyfaye6976 11 місяців тому

    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?
    }

  • @anomaligg814
    @anomaligg814 2 роки тому

    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?

  • @sabri8937
    @sabri8937 3 роки тому +1

    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!

    • @sabri8937
      @sabri8937 3 роки тому

      @Rock-Kun oh ok thank you!!

  • @cerkal2711
    @cerkal2711 2 роки тому

    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)?

  • @stegeflott
    @stegeflott 3 місяці тому

    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.

  • @salimyes
    @salimyes 9 місяців тому

    thanks you for this video it was extremly helpfull !

  • @jrgamesbrx
    @jrgamesbrx 3 роки тому +1

    You're the GOAT!

  • @matt.137
    @matt.137 2 роки тому +1

    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?

    • @matt.137
      @matt.137 2 роки тому

      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

  • @trick3891
    @trick3891 9 місяців тому

    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?

    • @Chris_Vrellis
      @Chris_Vrellis 9 місяців тому

      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

  • @MoonBabel
    @MoonBabel 2 роки тому

    Would creating an object with global struct in the initialization room be a good way of tracking player level, health etc. ?