Тёмный

Pickup & Use Items - Inventory (part II) // E17 // Make a 2D Action & Adventure RPG in Godot 4 

Michael Games
Подписаться 1,5 тыс.
Просмотров 748
50% 1

In this video we’ll add to our resource based inventory system by adding item pickups and a resource based item effect system for using items.
Topics Covered: Resources in Godot 4, Inventory System, Inventory UI, GUI, Godot UI, Pause Menu, Pause Game, Atlas Texture, Panel Container, Grid Container, Items, pickup
New Assets Needed:
- item_pickup.wav
- hp-up.wav
- items.png (latest version)
Asset Download Page: michaelgames.itch.io/2d-actio...
GitHub Repo: github.com/michaelmalaska/aar...
Discord: / discord
--------------------
Chapters
--------------------
0:00 Intro
0:36 Update Inventory Data Resource Script
6:43 Item Pickup Scene
8:58 Item Pickup Script
13:26 Add Player Inventory to PlayerManger
18:10 Add Item Pickups to Level
21:01 Item Effect Resource Type
26:16 Add ItemEffects to ItemData Class
30:03 Add AudioStreamPlayer to PauseMenu
32:26 Add Use to Inventoy Slot UI
36:29 Fix Inventory Description "Bug"
37:05 Handle Items Depleted
43:15 InventoryUI Handle Inventory Changed Signal
44:55 Fix Item Unfocus Defect when Item is Depleted
49:52 Test by Creating Brand New Item
--------------------
Previous Video - Resource Based Inventory System (part I) // E16: • Resource Based Invento...
Next Video - Save & Load Items - Inventory (part III) // E18: • Save & Load Items - In...
Series Playlist: • Make a 2D Action & Adv...

Опубликовано:

 

11 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@CptTiki
@CptTiki 19 дней назад
Forgot to comment on this one - i was excited to get the inventory loading!! :D
@smellfungussports
@smellfungussports Месяц назад
Amazing stuff. I hope this turns into a fully fledged game that we can play.
@kevinkowalski1
@kevinkowalski1 Месяц назад
very cool tutorial series so far. Working with custom_resources to the max_Level :) will you cover in the future certains things like how to create a cutscene. (Someone is talking. Monsters attacks and stuff like that) and by any chance how to create your own debug_(cheat)plugin. Something like, porting to a specific map, recovering health whenenver you want and stuff like that. I think thats helps a lot in the whole game dev process.
@MichaelGamesOfficial
@MichaelGamesOfficial Месяц назад
I hadn't thought of the debug panel - that's a great idea!
@Geminosity
@Geminosity Месяц назад
To get the focus to remain consistently after using the last of an item I had to move the await get_tree().process_frame to the start of the update_inventory function. I suspect when the focus was being lost it was generating the new ones before the old ones had been removed and so the new items indexes were 10 higher than they should be. By moving the wait to the start of the function the old buttons are definitely gone and the new ones are generated with the correct index... or at least that's my theory :P
@CassyCodes
@CassyCodes Месяц назад
Wow, this game looks really smooth. I'll have to go back to the beginning to follow along!
@McHumaty
@McHumaty Месяц назад
Will you teach how to randomize the drops of these items on the map? Godot knows which of the items she can provide to the player as a reward.
@MichaelGamesOfficial
@MichaelGamesOfficial Месяц назад
Soon I will cover adding random/semi controlled drops (with drop rates) to enemies :)
@Tuto1902
@Tuto1902 9 дней назад
Running into an issue where the focus is inconsistent. Sometimes it will work fine and other times it will loose focus after use. This happens randomly and in different items. I tried what @Geminosity suggested by moving the await to the start of the update inventory but I still get the same problem. Any ideas?
@Tuto1902
@Tuto1902 9 дней назад
Update: I solved it by adding one extra await line before grabbing focus (so, that's two await lines. One at the start and one before the end). I don't know if it's the best solution since there's an almost unnoticeable flicker after using the item, but at least it is consistent now 🤷‍♂
@simspam87
@simspam87 Месяц назад
great video... something strange is happening with godot, in the laptop I use daily the 'fix item unfocus defect when item is depleted' does not work, but if I use the same project directory on another pc everything works. 😵‍💫😵‍💫😵‍💫
@MichaelGamesOfficial
@MichaelGamesOfficial Месяц назад
Oh no! Perhaps I did something goofy that doesn't always work? I have been prepping a discord community for people to come share/help with issues, etc. So, I guess it's ready enough: discord.gg/zp2WDWgD If you join, perhaps you can share some snippets of your code, or any other info you have and we can figure out a solution :)
@simspam87
@simspam87 Месяц назад
@@MichaelGamesOfficial thanks... I don't think the problem is somewhere in my files.... I tried downloading the project from github and it gives exactly the same problem. That is, on the laptop the focus does not always work, but on the desktop it always works.
@MichaelGamesOfficial
@MichaelGamesOfficial Месяц назад
I updated the invite link: discord.gg/zp2WDWgD
@Tuto1902
@Tuto1902 10 дней назад
@@MichaelGamesOfficial Discord link has expired