GameMaker Studio 2.3 - Beautiful Inventory Series (One Long Video)

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

КОМЕНТАРІ • 75

  • @hazusuki
    @hazusuki Рік тому +10

    This video is criminally underrated. Should have thousands of likes. Great vid.

  • @joeltrouchet2534
    @joeltrouchet2534 8 місяців тому +4

    Just finished the tutorial, and it was pretty damn spectacular. You did a great job at explaining everything. I noticed one little glitch at the end that wasn't covered at it was that when you close the inventory without unlocking an item, when opening the inventory back up it won't display the description of that item until it is unlocked again. For my purposes, I didn't want the item to stay locked when closing the inventory so I just added "itemLocked = false;" to the if statement for closing the inventory. That way everything works as normal when opening the inventory again.

    • @gamingoverlord8854
      @gamingoverlord8854 8 місяців тому

      Right behind you bruh, just started. I just need this, a quest system, and a shop system and then I can finally start on the fun stuff

    • @gamingoverlord8854
      @gamingoverlord8854 8 місяців тому

      Hopefully I can reuse most of this for a shop system

  • @roanwa4712
    @roanwa4712 2 місяці тому

    Great video. Super helpful. When you are implementing the ailments section make sure to have the if statement set to if(ailment[i] == Ailment.Confused) instead of if(i == Ailment.Confused. Otherwise you are not comparing the array to the obj variables.

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

    Awesome tutorials. GML noob here and this channel is a breath of fresh air. It teaches the newest techniques and is extremely well explained. I appreciate that you take the time to explain the theory to why we are adding the code, and not just tell us what to add.

  • @bonnymich
    @bonnymich 29 днів тому +2

    I had no idea making a simple inventory would be THAT hard and time consuming, turns out its not that simple, damn

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

    Thank you for this one video upload! You are an awesome UA-camr and teacher.

  • @Zhene4eg
    @Zhene4eg 8 місяців тому +2

    Hey buddy, thank you a lot for this video.
    You helps me with many issues I had.
    1 more thing you forgot - when you open menu - then click on item and open sequence and than lock item by mb_right and after it if you close menu, you will have a bug with selected /locked item. To fix this in step event after 9 row show_description = false; - you need clear selected item , on row 10 just add item_locked = false;
    PS: I set 2 likes, from my account and my wife account :)) You deserve even 100 likes from every devs who watched this :)

    • @MagerTrash
      @MagerTrash 8 місяців тому

      did you figure out how to remove an item from the inventory?

    • @Zhene4eg
      @Zhene4eg 8 місяців тому

      @@MagerTrash yes, you want script how to delete reccord/colomn from ds_grid ?

    • @Zhene4eg
      @Zhene4eg 8 місяців тому

      @@MagerTrash ANd ypu'r right, Author not show how to do it :)
      let me give you my script for deleting reccord, 1 second. Also I will give you a bonus, how delete a row from grid, forexample if you don't need price or ammount reccord anymore and you donb't want them to be in grid.
      1) Delete reccord/column, just do this:
      grid_delete_column(_item_list_from_active_vendor_panel, _selcted_item_slot);
      This is script for delete:
      function grid_delete_column(grid, col) {
      var w = ds_grid_width(grid);
      var h = ds_grid_height(grid);

      ds_grid_set_grid_region(grid, grid, col+1, 0, w-1, h-1, col, 0);
      ds_grid_resize(grid, w-1, h);
      }
      2) If you want to delete rowm do this:
      function grid_delete_row(grid, row){
      var w = ds_grid_width(grid);
      var h = ds_grid_height(grid);

      ds_grid_set_grid_region(grid, grid, 0, row+1, w-1, h-1, 0, row);
      ds_grid_resize(grid, w, h-1);
      }

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

      Also you might need this function, which I also made -
      // @param Grid - Grid From
      // @param Comumn number - getting column number
      // @param Return as Array - if true - than return array of attributes in Target Column from target Grid
      // - if false - than return new DS List reccord with data
      function get_column_from_grid(grid, column_number, return_as_array) {
      if(return_as_array) {
      var _ds_to_array = [];
      for (var i = 0; i < ds_grid_height(grid); i++){
      array_push(_ds_to_array, grid[# column_number, i]);
      }
      return _ds_to_array;
      }
      else {
      var _ds_list = ds_list_create();
      for (var i = 0; i < ds_grid_height(grid); i++){
      ds_list_add(_ds_list,grid[# column_number, i]);
      }

      return _ds_list
      }
      }
      This function will helps you go get full data from specific column. You will need it for Buy or Sell actions, when you need delete item from inventory of 1 vendor and put this item into player inventory.

    • @MagerTrash
      @MagerTrash 8 місяців тому

      @@Zhene4eg yes if you could :)

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

    Loving this tutorial so far, however I believe there's an issue with setting up the camera script. At 33:56 you setup the view follow for function CameraY but use "camera_get_view_x" instead of "camera_get_view_y"

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

      Whoops! I do indeed, nice catch. I'm sure I fix this somewhere down the road, just not sure where.

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

    Thank you brother, this helped me alot! I really hope you continue to teach us and grow as a developer yourself!

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

    Any chance you can add one more video to this series showing how a player could pick up an item, and also remove an item so that it shows back on the map? - it’s a really sweet inventory!

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

      Have you had any luck with the picking up part? I was able to subtract items out of the inventory, and placing them in the world is easy to do with that system. I just can't for the life of me have them pick up correctly.

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

      I'm trying to figure out the same thing! Fantastic video.... just not sure (yet lol) how to "pick up" or remove items.

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

    Well structurized tutorial, thanks for that

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

    at 44:40 if anyone wants the "fancy math" to automatically wrap inventory around a certain width, try this.
    var itemX = CameraX() + ((i mod menuWidth) * itemSeparation);
    var itemY = CameraY() + ((i div menuWidth) * verticalSeparation);
    you will need to create the "verticalSeparation" variable in the Create Event and insert the distance you want to move the items down.

    • @ethanstefura5359
      @ethanstefura5359 Місяць тому

      This is great, but how do you create a "limiter" for drawing the sprites? Seeing that it will always draw all the way down the screen to no end?
      Thanks

    • @FlowSwitchMusic
      @FlowSwitchMusic Місяць тому

      @@ethanstefura5359 The for loop sets the limiter. The loop runs until "i" reaches the target number which in this case is the width of the ds_grid. If you are having an issue with sprites drawing infinitely, it sounds like you didn't set up the ds_grid_create function properly.

    • @ethanstefura5359
      @ethanstefura5359 Місяць тому

      @@FlowSwitchMusic Thanks for adding clarity around for loops! I've always just copied them down a little confused; I've got to read more about them in the manual. The problem was way dumber than any issue with ds_grids lol. My menuHeight was set to 48 when in my game it should have been set to 7. Thanks!

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

    Thank you!!!

  • @Zhene4eg
    @Zhene4eg 8 місяців тому

    And 1 last thing I founded - when you open sequence and locked item, you still can DnD it. maybe this was an idea, but I think this is a bug, because locked item should be permanently locked :) Anyway this is an small issue and I think everyone will find how to solve it.

    • @Zhene4eg
      @Zhene4eg 8 місяців тому

      PS: for people who not understand how to do it, in place where you implement DnD system just wrap it in if-else check and check item_locked, so you let DnD sysem work only if no item was locked..
      This is what I did :
      // Drag And Drop system
      if(item_locked == false) {
      if(mouse_check_button(mb_middle)) {
      dragged_item = instance_find(o_item_parent, 0);
      dragged_item.x = mouse_x;
      dragged_item.y = mouse_y;
      dragged_item.visible = true;
      dragged_item.image_xscale = item_scale * 0.5;
      dragged_item.image_yscale = item_scale * 0.5;
      dragging_item = true;
      }

      if(mouse_check_button_pressed(mb_middle)) {
      dragged_item_slot = current_item_slot;
      }

      if(mouse_check_button_released(mb_middle)) {
      dragged_item.x = -100;
      dragged_item.y = -100;
      dragging_item = false;
      alarm[0] = 1;
      }
      }

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

    Though there's been a bunch of changes to GMS since the release of this video, I'm still going to watch this. Aaron, if you're still checking out comments here, what are your thoughts on these systems in the video compared to what you might be able to do with the current version of GMS 2.3?
    I'm working on a small-scale ARPG with randomized equipment drops (think Diablo or Path of Exile, for example)... I see there are actually multiple ways to tackle this. You have arrays, grids, structs, etc. Which would you favor for randomized equipment? I'm only about seven minutes into the video, so this might get answered along the way. Thanks for your time.

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

      This series is still quite relevant, even with newer updates. Structs are really the only new language feature which would alter how you might make your game, although I’m still figuring out how practical they are. I prefer grids, as they are flexible and you can do anything you want with them, once you understand their workings.

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

    Hola, soy nuevo en esto pero llevo desde pequeño jugando a juegos, asi que me propuse intentar hacer un juego viendo tutoriales, pero tengo un problema, no se nada de ingles pero desde que estoy con game maker estoy entendiendo un poco, tambien veo videos en español, pero el tuyo es el, que me tira para a delante, siembre quise hacer un inventario, se que el tuyo lo podria hacer viendo el video, pero la explicacion que das no la entiendo, y no es porque no lo digas correcto, si no porque no entiendo nada de ingles, pero gracias por tus videos y si puede ser subtitulado en español españa, mejor, jaja. Gracias de todos modos

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

    Can you put timestamps on where each part start in the long video?

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

    Hey I have really been enjoying this video, even a couple years late. I am having trouble with the Description Box animation. It keeps showing up under the black 'haze' layer. at about 1:04:43 in the video.
    I am a total beginner. Any help? I feel like I have matched the rest of the code perfectly.

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

      Well, after struggling all day, and just after sending this message; I found 'a' solution. I set the layer depth at -200 (for my target layer) and the sprite showed up on top.

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

      @@peterdarrouzet2779 Beginner as well following this tutorial: I've found that sequences are really annoying when it comes to depth sorting, having to make another layer feels like a janky solution to a simple problem.
      It also doesn't draw on the camera, but on the actual room (which is fine if your game pauses during menu selection, but it would be nice if it were consistent with the other parts of the menu). I'll come back to your comment if I find any improvements with managing the sequence within the menu system. Sorry I can't be of any help!

  • @oofplays1187
    @oofplays1187 6 місяців тому

    Im running into an issue. When i try too close the description it just makes a new one and closes that one can anyone help me?

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

    I know I'm very late to this but for some reason I cant get the draw in the parent object for the "Costs this much" part to display in front of the inventory box, I've tried manually setting the depth but its always drawing behind any ideas? the instance layer is also at a lower depth than everything else so really no clue why it isn't working as intended.

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

    Already having trouble with the breakpoint @24:00 as I am using DND. I can't seem to do a breakpoint since there's a declare a new function,.. I just fixed that I just converted it to GML.. but when I hit the f6 debugger, I see the variables and then globals.. there's nothing there.

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

    There is no method to remove items from the inventory. Is it possible you can give us some direction on this? Maybe post it here? I tried figuring it out but I just break everything.

  • @northernnevadax-wing6655
    @northernnevadax-wing6655 10 днів тому

    hello great videos ive been working on this on and off for a few days now. im getting stuck at 1:32:00 the dragging system. when i go to hold down the middle mouse button nothing happens and the icon doesnt get picked up. could use some help on this. thanks

    • @northernnevadax-wing6655
      @northernnevadax-wing6655 10 днів тому

      solved for anyone who is also stuck on this. all of my sprites for my game objects went away so i just re attached the sprites and it worked.

  • @Megga_1
    @Megga_1 4 роки тому

    Good video bro

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

    I dont know if this is going to be usefull for someone, but ill leave a not so "fancy" math way to go through the rows with a single IF statement:
    //Items//
    var currentRow = 1;
    var itemY = 56.5;
    for (var i = 0; i < ds_grid_width(myItems); i++)
    {
    var rowCheck = floor(i/menuWidth);
    var itemSprite = myItems [# i, Item.Sprite];
    if (rowCheck == currentRow)
    {
    itemY += 22.5;
    currentRow++;
    }
    var itemX = 22.5 + ((i - (menuWidth * rowCheck)) * itemSeparation);
    draw_sprite_ext(itemSprite, 0, itemX, itemY, itemScale, itemScale, 0, c_white, 1);
    }
    }
    By the way, thanks for the awesome tutorial~

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

    Great video! Would you be able to help? I'm not sure how to add an item to my inventory by having the player pick it up. I've tried using a ds_grid_add and even tried changing the code to use ds_lists, but still no luck.

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

    I realize I'm a bit late to the party, but is there a way where I can just use the items instead of locking them first? And I need to be able to get the effects of the items when I use them. Also picking up items and dropping them.

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

      There are ways to do all of that, just not necessarily with this specific system. Once you know how an inventory works in general, you can then take it and customize it to fit your game.

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

    Hello, I am having some issues with 2 things at 1:06:41. The code from line 45 does not seem to do anything, I added a show message and it does not appear when clicking there. I removed the -if statement for line 45 and just left a check left click and the message appears with the sequence reversing. I could also leave the draw rectangle in the same spot and still nothing happens when I click on the rectangle with the same coordinates.
    The description box is also not following the camera when it moves around like the inventory menu does. Not sure what I am missing unfortunately. Could it have anything to do with layers or should the point_in_rectangle work in any layer?

  • @michaelcapone175
    @michaelcapone175 4 роки тому

    Is there anything in this 'long' version not shown in the smaller individual videos, such as were any bugs or editing you found needed to happen after deploying those shorter videos fixed in this longer version? Or are they identical except that the longer one is just one video?

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

    I love u :o

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

    ive tried this with my game and i got an error back saying can not add item to master list and another stating allitems not set before reading

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

      probably missed the CAP "I" in all global.allItems, or it can be because the creation order, go into room settings "Instance Creation Order" and put obj_Item before the obj_Controller.

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

    I've made it all the way to part 10! I'm having an issue of not being able make more than 7 item slots. I noticed as well when you go from part 9 to part 10 you suddenly have 3 blue jelly instead of just one and the second blue jelly Item with a value of 2 doesn't add together to make that 3. I keep getting the error of "wrong attributes" when trying to surpass the 7 slots but I just can't seem to figure out why.

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

      Hmmm. It’s been a while since I’ve looked this project over, so I can’t say off the top of my head. Be sure to download the finished project and compare your code to mine and see if that helps.

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

      @@LetsLearnThisTogether That's alright Thank you so much for responding anyway, I totally forgot about the finished project! I'll finish the last 2 parts and then compare the two codes.

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

    I am on part 6: animations with Sequences and have completely written all of the code, but am getting a bug I can't squash. I have set up the menu and hover, and can click on an item to make sqDescriptionAnimation play. I am also able to click on the x on the sequences to make it reverse the animation. I am then able to successfully click on an item again and replay the sequence once more. The problem is that once the sequence initially plays, the final frame of it is stuck on my screen as if permanently open. clicking the red X shows the animation playing behind it, and bringing up a new animation animates up towards it.I've gone through the code several times and am not spotting what I have off, as well as recreated sqDescriptionAnimation to try to fix anything off with that but no luck there. I am not seeing anything about it with google either. Anyone have ideas?

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

      I had this same issue and I thought maybe it's creating multiple Sequences or something aha so I added "showingDescription = true;" here. (Meta layer is just my highest layer, ignore that). This fixed it for me.
      // Clicked on a item
      if (mouse_check_button_pressed(mb_left) && showingDescription == false)
      {
      sequence = layer_sequence_create("Meta", CameraMiddleX(), CameraMiddleY(), sqDescriptionAnimation);
      showingDescription = true;
      }

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

      @@Neptune_369 Thanks! This makes a lot of sense.

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

      @@zuggfizzle9648 Yeah after this little tweak the whole Inventory system in this whole video works so if you run into problems it probably isn't because it's the newest version on Gamemaker Because I also am on the newest version (everything else worked for me apart from the click to lock item although I just use a different click to lock "mb_left", and to unlock "mb_right" because it feels better for my game anyway so easy fix for me aha). Safe typing my friend. :)

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

    you sound like Ross from "Friends"

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

    why cant I find a tutorial that recreates a final fantasy inventory / menu system. *sigh*

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

    Could you help me? I am doing this tutorial in resolution 640 x 360 and nothing is working properly.

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

      How exactly isn't it working? The resolution shouldn't change anything except where you're drawing things at on the screen.

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

      ​@@LetsLearnThisTogether All items are shifted approximately 10 pixels to the left and 10 pixels down. btw It is amazing tutorial.

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

      If you know the exact amount, just add that into your equation. Not sure why it would be shifted at all, that’s strange.

    • @ethanstefura5359
      @ethanstefura5359 Місяць тому

      @@elthelwulf3107 could be the origin of your sprites

  • @Megga_1
    @Megga_1 4 роки тому

    Search, Astarout engine. It's an engine that a guy is making, which is for cell phones ....
    But make no mistake, you will have in the full version:
    -2D
    -3D
    -VR
    -Online
    Creator is Diogo Studios