Godot 4.0 | Interaction Tutorial (🤯)

preview_player
Показать описание
In this tutorial, I'll show you how to create an interaction system in Godot 4.0!
(Please note that this will not improve your interactions irl)

Also sorry if I sound a bit less "excited" than normal (if that's even possible).
Just getting over a cold :/

Please leave a like, and comment if you learned something from this video, have suggestions for better ways to optimize this system, or would like to share ideas for future tutorials :)

Thanks for watching!
-----------------------------
If you'd like to support my work, you can follow me on Social Media or buy me a coffee! :)
Instagram: @queble_game_dev
Twitter: @Queble__Games
YouTube: ... :O
-----------------------------
Рекомендации по теме
Комментарии
Автор

Checkout my latest iteration of this interaction system here!

queblegamedevelopment
Автор

For those as myself who might wonder, you can see colision shapes if you turn on the menu options : Debug -> Visible colision shapes

mathieucyr
Автор

For anyone wondering, I tried this with the corresponding 3D nodes (because I wanted a basic interaction system in my 3D game) and it worked too!!

Thank you so much for this tutorial!!

miniponti
Автор

This is amazing! There is a surprising lack of good 2D interaction tutorials on Youtube, so I had a hard time finding one that worked.
Thank you so much for this tutorial! 😄

bubbathesomewhatreal
Автор

cool video, It helps a lot. As a player, it is super annoying when several interactive objects are close together and you fail to interact with the specific one you want. A simple solution would be to send the interaction at the end of all_interactions when you interact, so you can loop around all interactions available at a point. a UI clicable list of interactions that appears when you maintain space bar would be better but much more work.

Jdaucfqluoess
Автор

Thank you much for this tutorial! I spent a good chunk of my day trying and failing to get a dialogue box working, but stumbled across this and managed to get it working flawlessly very quickly, even if just to print text out into my console. Everything is so very well explained, I definitely feel like I learned a lot about Godot scripting from this video. Cheers!

ManyLizards
Автор

Great tutorial to make the interaction part of a game to work. Fast and efficient, and nicely implemented into previous coding that you might have for movement and others. Still tinkering now about how to make dialogue layouts to appear instead of printing the text, but this is an amazing start that helped me boost interactivity in less than 10 minutes of working with it. Thanks a lot for your time and experience!

origenydestino
Автор

Holy crap I think this is exactly what I need! Thanks for the video!!

tjspeirs
Автор

One nice feature is to add a cycle based on mouse wheel for going between the interactions, so you can select which one you want. Just replace the 0 index with a var which you increase or decrease on mouse wheel inputs, just make sure to accommodate for edge cases.

JokerSmurf
Автор

Amazing tutorial. Dozens of others failed to do this same concept as clearly, quickly and cohesively as you. Good job!

Foxion
Автор

I like this system. It's pretty clean! And on top of that, I learnt a couple of things in GDScript and Godot I hadn't yet searched for (like exposing variables in the engine ui to modify them in 2D view, or the entire layer/monitoring/monitorable system...)
I think the only thing I'm going to change is to get all the interaction code out of the player_character script and just reference it, 'cause I don't like having one script doing everything.

Thank you very much for that tutorial.

SebLeCaribou
Автор

This was so helpful, thank you ;-; only on my second day of learning godot

lorekeepermeerah
Автор

Just a heads up for anyone who ran into this issue as well. I was getting this error:
Node not found: "Interaction Components/InteractLabel" (relative to "/root/Main/player") when using $"Interaction Components/InteractLabel"

Turns out (at least with Godot 4.2) that I needed to remove the space between Interaction Components in my path reference.

works both with and without being encased in double quotes.

Danachew
Автор

This is a good tutorial, but I would highly suggest you add in the title that this is Godot 4.

Gbtx
Автор

Great tutorial, and explained in detailed. Subbed!

BDgamerplus
Автор

this worked great for me, thank you for the easy to follow tutorial!

ruthmiller
Автор

Finally got my dialog box and side images to show up.

thicccrusade
Автор

Thank you for your work! But please, make your code more readable on FullHD monitors.
Editor -> Editor Settings -> Interface Editor -> Code Font Size pls set font larger to 20 or 22 just for video watching purposes

ojisan
Автор

yes I will absolutely subscribe. Thank you for helping me get past this hurdle so I can finally go to bed 😭

EDIT: Actually I need some help wrapping my brain around this. Could someone help me figure out how, with this setup, I'd trigger an event in an NPC's script with this? I know I'm like just on the edge of the knowledge I'd need to figure this out, but I'm still too new to have that intuition 😅

jargontrueseer
Автор

hey Queble, great tutorial! One question though, how would I use this to change a scene on interaction? My code currently is

func execute_interaction():
if all_interactions:
var cur_interaction = all_interactions[0]
match
"print_text" :
"signal" :
"travel" :

but the "travel" part isn't travelling. I've tried a few different ways to write this, but i'm fairly new to Godot (and programming in general) so I can't quite tell what I'm doing wrong. I'm fairly certain I could just use a signal that when detected could change scenes, but I don't really wanna do that. Thanks in advance!

goosenyan
join shbcf.ru