Player Interact with Objects & Resource Signal Bus Tutorial - Godot 4.2

preview_player
Показать описание
Detailed tutorial showing how to let a player press a key to interact with interactable objects such as a Shop, a Switch, or a Chest. For accessing player data, we can also use Resources with signals to serve as a signal bus for telling user interface nodes when the player is set or updated.

Pre-Tutorial Project

Finished Project for

➣ Downloadable Assets, Video Courses, and Other Places to Follow Me

➣ Art Used in Demos and Devlogs

00:00:00 - What to Expect
00:00:39 - Starting Point
00:01:21 - Player Interacter Component
00:03:01 - Interaction Script
00:06:21 - Interactable Receiving Script
00:07:46 - Fan Interaction Setup
00:11:23 - Setting the Selected Interractable
00:16:31 - Fan Interactable StopInteraction & PrintDebug
00:18:00 - Fan Animations with is_on Toggle
00:27:37 - Shop Interractable
00:31:26 - Create Visual Indicator for Selected Interaction
00:42:32 - Select Closest Interactable on Process Update
00:46:53 - Show Player's Name in Shop
00:48:57 - Show Player's Money in Shop
00:54:23 - Resource Signals to Send Data from Player to UI
01:03:26 - Money Change Button and Making Shop & UI Reactive
01:10:26 - Wrapup
Рекомендации по теме
Комментарии
Автор

Hey Chris! This is a realpy helpful tutorial! Thank you so much for making it!

azulcrescent
Автор

This is exactly what I was looking for, thank you for the tutorial!

DrFlorent
Автор

Sir, can you please make save, level and ability system to your Unity Platformer Crash Course? Your videos are very understandable and instructive than others. I would love to watch.

mahmutkaan
Автор

Hello again, I finished the first part of the tutorial (up to 27:30) and noticed that once you enter the interaction area and toggle the fan on, you can continue to toggle the fan even after leaving the interaction area.
The array nearby_interactables is cleared once I leave the area, it's size reduces to 0, but for some reason hitting the action key still toggles the animation.

Edit: He talks about this at around 40:10.

yendak
Автор

Could you make a tutorial for a fighting game in godot 4.2? I'm sure it will make a lot of people happy and you'll get a lot of views too.

DiegoForcin
Автор

Would it be possible to provide the Pre-Tutorial Project in a version in which it can be started without a Vulkan capable GPU?
So that it is able to run in Compatability mode aswell?

yendak
Автор

Curious, once we press our interact button, how or where can we make the indicator above the object hide? And when we leave the area it resets so returning to area it will pop up again. If you got a min, I am stuck on getting ride of the dancing pineapple. ;) Great help and thank you

djdavidj
Автор

Could you make a tutorial for a fighting game? It would be really cool if you showed the implementation of the multiplayer mode.

THATman-rz
Автор

i really liked you approach ! I'm still at a very early stage of my developement practice and i have a question ! It feels like your approach is very similar to the interface principle in c#. Is it as efficient in godot as it would be in unity since there is not real official way of doing interface in gdscript ? (yet hopefully) Thank you very much !!

guillaumechat
Автор

May i ask do you still use cyberghost?

benjotest
Автор

"Expression is of type "Area2D" so it can't be of type "Pickup"."

jujifenty