Dynamic Inventory Setup - Construct 3

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

КОМЕНТАРІ •

  • @scottmclennan9231
    @scottmclennan9231 2 роки тому +4

    Awesome,thanks for sharing I've been struggling with arrays to do the same thing. You rock!

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

      Happy to be of some help :)

  • @woolguide1385
    @woolguide1385 9 місяців тому +3

    Incredibly useful tutorial, but when i followed a long by the end, the inventory was up and working (good) but if you kept clicking the item, it would keep moving slot until it gets to the last one, in which it deletes itself (not so good) so if anyone knows how to fix this, pleas let meh know. other than that, perfect tutorial, just started recently on construct, and have been struggling, so this helps a ton!

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

      Hey there Woolguide! It sounds like you might be missing a something with the Set invSlot to false, but it is hard to tell without seeing what you have in your event sheet. If you want to swing by my Discord you can send me some screen shots and Ill be happy to help you out! :D
      discord.gg/j5N92B6vYp

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

    Is there an easy way to make the items drag and drop once they are in the invSlot? Something that would snap the items into a slot and also move an item that is there over or switch with the other item? So, the player can move the inventory around - organize it. I made them into a family and gave them the behavior of drag and drop, but only when they are over the background, but I can't figure out how to make them stick to the squares once I drag them.

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

      -- By the way, I don't use Construct anymore so some of my info will be dated or a little off --
      There is no easy (built in) way to do this, but it is doable.
      You will want to find a way to track where your item started, so you can send the item back if required ALSO so you can send the swapped item to that spot if you are switching to places.
      There should be some form of checking when you are releasing the drag dropped item, during this time, you will want to check if it should be centered on an inventory slot nearby or returned to the original spot or even dropped on the ground (This can be done by checking if the item is in collision with an invSlot or maybe the inverse of colliding with your overall Bag space means you missed and it should be dropped.
      You will also want a way to stop dragging and dropping if items aren't in your inventory - You shouldn't be able to Drag an Item that dropped from the monster from the ground to your Inventory. So when you collect items, track they are collected and when you drop items, track they are not collected - then require items to be collected to activate Drag and Drop.
      I have a video for GDevelop that goes over all the ideas - Obviously the Engine is a bit different, but the core ideas are the same. This is part 2, but it covers what you are attempting to learn next:
      ua-cam.com/video/jdVgieW4L6k/v-deo.html

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

    This is Great!!!
    Could you possibly explain how to make each color have several different shapes. Like red has a circle, square, triangle so players can load just red and just green and just yellow?
    Thank you

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

      Hey SutckAtHomeMom hope you are doing well!
      Not sure I understand your question completely, but you can always create multiple animations under yellowPotion (triangle, Square and circle) Then when you load the yellowPotion into your game you just need to select what animation Name to set it as.

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

    Thanks for the Video! It was really helpful!

    • @Winstreak1
      @Winstreak1  3 місяці тому +1

      Happy to help - Best of luck on your Game Dev journey!

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

    Thank you for this helpful tutorial

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

      Very happy to help. I have a few different Inventory videos scattered around my channel if you need more assistance. 😊

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

    Great Tutorial! I made a system where if you press I the inventory will become visible, if you press I again the inventory will become invisible. The problem is I don't know how to do that with the actual items. I want it to disappear from the layout and when the inventory is pulled up it's visibile. And when the inventory is closed it to be invisible. Also do you know how to make the InvSlots and the InvScreen follow the player? And last question can you make it so if you pressed the item again in the Inventory slot it will dissapear and have the intended affect on the character? Thank you!

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

      To have the inventory stay in the same place no matter where you move the camera's you will need to place the inventory and all things in the inventory on their own layer. Then in the layer Properties set Paralax to 0x0.
      As you pick up new items, they should move from the layer your character is on to your Inventory layer.
      Simply Set the entire Inventory Layer Hidden then Visible when you press 'I'.
      Just because something is invisible, it doesn't mean you can't interact with it. The video below helps with that.
      ua-cam.com/video/i4FhsCU6EqE/v-deo.html

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

    Sorry for asking another question, how can I toggle items?

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

      Set them up for on click/tap or keyboard key as well as making sure they have the Boolean true to being in inventory.
      Then add what ever effect or equip and destroy or remove it from inventory

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

      May you please make a video on it please 🙏

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

      @@trouble6043 this video talks about it at around the 12 minute mark. I just use overlapping inventory as my verify instead of a Boolean to check if it’s in my inventory. There’s a 1000 ways to do any one thing when it comes to game dev.
      I can’t make a video on every different aspect, but if you want to try to make your inventory then share your code with me when you get stuck. Get in touch with me on discord: discord.gg/NTQxEGH7Na

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

    i have a question. hopefully u have tha time to answer it.
    you mentioned putting the potions in a family.
    i do have the C3 subscription , and im trying to figure out how to use what u showed but using a family. so far every way ive tried, it just adds all of them at once or all of them in a random order. ive never really figured families out so i dont understand how to have them in a family but still have the one i click on go into the inventory.
    how would you put them in a family and still have this work?

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

      I will do my best. Families work a bit different so I always have to play around with them a bit. I made a video but I dont have time to edit it right now (And it definitely needs to be edited :-P). Either tomorrow morning or after work I will get it posted for ya.

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

      @@Winstreak1 thats amazing! thank you!!

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

      Feel free to give it a look: ua-cam.com/video/2voxfFZ0Wrk/v-deo.html

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

    Thanks You Man! I

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

    im feeling dumb right now. i have legit copied exactly what you've done(and ive done it over about 4 times now, and double checked everything) and still nothing happens when i click on a potion (the part where you go to test it out at first and you clicked on the yellow potion, and then all your inventory slots filled up with yellow potions.) well when i click on any potion , nothing happens. im so confused right now.

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

      It's hard to know exactly what is wrong without seeing your project.
      Do you have more than 1 layer, you could potentially have items show up not visible.
      Are you Inverting the invSlot is Full check?
      Did you mess with the Z-Levels of anything? Specifically your Inventory slots. If they are higher than your potions you could be creating them and just not able to see them?

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

      ​@@Winstreak1 thank you! i tried everything except for the bg layer(i just have bg layer and layer 0) i didnt think the bg layer being under layer 0 would do that. and the fact that the bg was on the bottom of the bg layer, and the potions are on the top of the layer 0 which is above the bg layer. makes no sense to me. but thank you so much for taking the time out of your day to help!!

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

      Awesome, glad I could help :D

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

    How can you make something run over an item and then it shows up in the inventory?

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

      Give the item a Boolean isCollected set it to false. When you collide with the item set it to true and move the item position to an open inventory slot.
      And depending on the Boolean being true or false you know if it’s in your inventory or on the field - so you can hide it when you close your inventory or use it with right click if it’s a usable item etc.

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

    How would you make the Items Stackable. Instead of 1 taking per slot. Have green stack up?

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

      Would It also be possible for a Crafting Tutorial. So If you Mix Red and Green that makes another colour etc

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

      Ya, I will get you an answer back tomorrow :)

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

      You can find a video for stacking potions here:
      ua-cam.com/video/Hrf8j0jliNU/v-deo.html

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

      I can't get to that video this weekend but I will add it to my list. :)

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

      @@Winstreak1 Cool, I was looking at my code and when I click one of myt Items they destroy but the others dont. How could I fix this?

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

    Hi, how to keep inventory content in other layouts?

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

      Not something I have used in any of my games.
      In theory you want to use Global variables or and objects you have that hold instance variables will need to be set to Global - Click the object then its a check box in the top left 'properties'