Тёмный
No video :(

Interactable Objects in Godot - Make an FPS in Godot Part 3 

Code with Tom
Подписаться 13 тыс.
Просмотров 40 тыс.
50% 1

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

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 118   
@RaiderJake
@RaiderJake 4 года назад
Great tutorials, sad there are only 3 but totally understand. I'm just getting into to game development and I'm in way over my head. These are SO helpful. I like that you include links to source code as well, nobody does that
@_cul8r_
@_cul8r_ 4 года назад
I'm really enjoying these tutorials, and I was sad to see there were only 3, but then I saw that this on was just made in Septeber, so I'm really hopeful that you will continue along, but as a fellow RU-vidr, I understand how life can be. Cheers mate!
@CodeWithTom
@CodeWithTom 4 года назад
Thanks CuL8R, glad to here you're enjoying these tutorials. I've been taking a small break but I'll be back to making videos in December :)
@tylerneo
@tylerneo 4 года назад
@@CodeWithTom Hey Tom, it's March and just wondering hows it going?
@lordarty3315
@lordarty3315 4 года назад
@@CodeWithTom Hey tom, alright with u? i miss your tutorials :(
@vickylance
@vickylance 4 года назад
@@lordarty3315 He posted a tutorial 2 weeks ago :) cheer up
@simoneleven338
@simoneleven338 5 лет назад
Thank you so much sir for these amazing tutorials, please don't stop making as I need to learn much more like: -How to make intractable doors? -How to make my character crouch and prone? -How to make intractable objects with physics that the player can hold and manipulate (like in half life) -how to implement ragdoll (like when you shoot the enemy balls they fall to the ground) -How to give the player and enemies a health bars. How to make the enemies follow you using RayCast. -how to make the player go up stairs and ladders. These are just suggestions for future episodes I hope you put them into consideration.
@CodeWithTom
@CodeWithTom 5 лет назад
Thank you Simon. Fantastic suggestions. I'll be sure to try and cover some of those topics 😁
@blakecasimir
@blakecasimir 4 года назад
TBH what would be great is if the community could come together to create an FPS “engine” for Godot that features all of these things, menus, save / loads, level switching / hub code, classes for enemies / items / inventory etc already. Sort out all the coding and back end so that people can come in and make content / games with it.
@xenopulse
@xenopulse 4 года назад
@@blakecasimir There's a First Person Starter kit in the asset store that'll hopefully be expanded over time (or you or anyone could use it as a base for an expanded version): godotengine.org/asset-library/asset/424
@Amipotsophspond
@Amipotsophspond 4 года назад
one way to do it. if you think about "doors", "my character", and the "pickupable" as all things that have the "transform" section so perhaps a opening door is a slab that rotates and moves. if you look at early 80s games you see they used large blocks in place of doors that would simply move. so the my character including collusion shape what is crouching down but scaling it down so it's smaller, pickupable is the same moving is just changing it's location XYZ. now I would guess that a game engines has a better way of doing all of this that I would tell you if knew. so how to give them health bars that's like a ammo bar. so health would be a var like ammo but instead of going down when the player clicks it would be going down when the player collides with. so if you know the players XYZ it would be making enemies more towards that. their are some godot 2d guides on this, is 3d really as that different? the player going up stairs so perhaps a raycast at the players feet angled down that prevents collision with the floor by moving the player up. so when it encounters a stair it moves up so it can be on top of it. I don't know if this is the way to do this but it's the way I would try. the ragdoll this -> ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Cqp3PJQIrUc.html but in 3d. oh ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-85UoXrGr6qQ.html
@ashisharky
@ashisharky 4 года назад
Wonderful tutorial. I made an npc that triggers a dialog line for my rpg. Edit: also the lightswitch part was perfect for making a functional door.
@fragarena9910
@fragarena9910 5 лет назад
yay new video :D your tuts are very high quality
@CodeWithTom
@CodeWithTom 5 лет назад
Thank you Frag!
@imthecatking
@imthecatking 2 года назад
Thanks so much for this tutorial, I'm building a game for a school project and I didn't know how raycasting, interaction, etc worked but this was simple and easy to understand, 10/10 tutorial!
@johnnyvulture6793
@johnnyvulture6793 2 года назад
amazing tutorial hands down one of the best i have watched
@321357w
@321357w 5 лет назад
Interactable doors would be a great tutorial for the future and how the doors are animated. looking forward to new tutorials.
@CodeWithTom
@CodeWithTom 5 лет назад
Great suggestion Jeff
@321357w
@321357w 5 лет назад
@@CodeWithTom Would be interested if it can be done with script from an object imported from Blender or if the Blender object would require the animation files.
@titustech7219
@titustech7219 2 года назад
sadly i had to delete every thing i followed in this vid because it wouldnt work but thank you other than this tutorial every thing has worked
@smeister6274
@smeister6274 4 года назад
Keep it up! I have learned a lot from your tutorials. Thx!
@Scottagram
@Scottagram Год назад
Great tutorial, though I went off script at about 20:00 when I considered using signals instead of get_node. I'm still a noob at this but at least with my current prototype, it made more sense to segregate the functionality of buttons from the functionality of the linked objects. As a four-player splitscreen game there might be several people pressing a button at once, so I'm let the receiving end of the button be it a light or elevator or artillery piece decide what to do with the player input. Even before implementing them I've realised there could be situations where two players hit a button. Triggering the button twice through direct method calls could result in things like lights going on and off during the same frame.
@efimov90
@efimov90 4 года назад
15:05 Actually: Layer at collision means that switch can't detects player, but player can collide it, so for correct work you should set Mask attribute to Layer2
@mystikk3025
@mystikk3025 2 года назад
Great tutorials! you can follow it or break out a little I LOVE IT
@badmrbox
@badmrbox 4 года назад
I would love to see a wolfenstein-ish door tutorial. Never seem to find any of those ever.
@dzshiftt
@dzshiftt 5 лет назад
Well, found your videos in the last few days, thank you for publishing something to comprehensive and easy to follow! I'm still learning my way around the godot engine, but so far this helped alot!
@CodeWithTom
@CodeWithTom 5 лет назад
You're very welcome, thank you for checking out the channel I really appreciate it. I'm really glad you find the videos useful! 😁
@Yan-Digital
@Yan-Digital 4 года назад
Please I swear to god continue this serie
@CodeWithTom
@CodeWithTom 4 года назад
Next part will be out very soon 😁
@Yan-Digital
@Yan-Digital 4 года назад
@@CodeWithTom No way man, truely my hero I swear !!! Thank you so much !!!
@Buli0n
@Buli0n 4 года назад
Please make more! This is very helpful!
@CodeWithTom
@CodeWithTom 4 года назад
Thank you, I certainly will
@riedewaanbey617
@riedewaanbey617 5 лет назад
A FPS in android would be great if you could find the time. Even just the basic movement with 2 joysticks.
@CodeWithTom
@CodeWithTom 5 лет назад
Mobile touch controls is something I'll definitely be covering in the future
@N4SKK
@N4SKK 5 лет назад
great tutorial
@CodeWithTom
@CodeWithTom 5 лет назад
Thank you Renan. It's on the list to cover AI state machines. It's a pretty big topic though so I just need to work out how best to cover it. Possibly start with a simple state machine and move on to more advanced ai at a later date.
@waywardpooch9567
@waywardpooch9567 5 лет назад
@@CodeWithTom That seems like the smartest way to build towards the concept. Could probably refactor the player's code to have a state machine for that first, then move on to basic AI following, which naturally leads to pathfinding, etc. It would be great to have a short video sometime on how to program viewbobbing; I just figured out an easy way to do that building off your first FPS tutorial, but I know many people probably haven't figured that out yet. At the end of the day, just keep rocking it, man! You're definitely in the mix for best Godot tutorial producers already, in my opinion.
@CodeWithTom
@CodeWithTom 5 лет назад
Thank you so much Wayward! I'll try and squeeze in a video about head bobbing at some point 😁
@sablesanctum
@sablesanctum 4 года назад
Really enjoying this series. Thanks!
@CodeWithTom
@CodeWithTom 4 года назад
Thank you!
@chantolove
@chantolove Месяц назад
Here from 2024, where scancodes are outdated. At 10:29, you probably want to use "var key_action = InputMap.action_get_events("Interact")[0]" and "var key_string = OS.get_keycode_string(key_action.physical_keycode)" instead.
@themissinglink2163
@themissinglink2163 4 года назад
Excellent tutorial, Thanks. This fast-tracks learning. Much appreciated.
@CodeWithTom
@CodeWithTom 4 года назад
You're welcome, thanks for the comment
@caveirainvocada9438
@caveirainvocada9438 2 года назад
Amazing tutorial! Exactly what i wanted!
@ydkim8755
@ydkim8755 2 года назад
You are a great person.
@darkyassin
@darkyassin 4 года назад
Hi Tom, is it possible to continue on this tutorial and create a basic UI inventory and pickup items? That would be amazing.
@CodeWithTom
@CodeWithTom 4 года назад
Good suggestion, I'll see what I can do :)
@KellenChase
@KellenChase 4 года назад
This is what I’m looking for too :)
@KellenChase
@KellenChase 4 года назад
Stuck with the default interaction label across the bottom of my screen from first load even when not interacting. Can’t seem to get it to change whether I go over to the object or not. Can’t get a response in the output from the print command when using the interaction key. Any thoughts?
@ralfbierig
@ralfbierig Год назад
Thank you! Very useful for my project.
@SketchwareTutorials1
@SketchwareTutorials1 4 года назад
hey make a tutorial on how to add weapon models and make shooting animation
@TheMaxthesis
@TheMaxthesis 4 года назад
Very good! Enjoyed this and learned a lot!
@CodeWithTom
@CodeWithTom 4 года назад
Awesome! Really glad you enjoyed it
@TobeasJ
@TobeasJ 3 года назад
Thanks for the tutorial. This is very helpful!
@sergeiorlov5096
@sergeiorlov5096 3 года назад
Helo Tom, and thank you for your tutorials. I've followed your tutorials, quite literally symbol-by-symbol, nad still get this annoying error after declaring the (current_collider = null), at 5:51... The error is something to do with the class name, but I'm oblivious to what (since the code worked for you, without any errors). The error is: The class "Interacteble" couldn't be fully loaded (script error or cyclic dependency). Any help with that? P.S. Thanks again for your work.
@tsk5328
@tsk5328 3 года назад
Hi, not sure if this relates, but I also ran into a problem there (but possibly a different problem) basically if I hit the interact key looking into empty space the game would crash, the interactions were not triggering and the interaction text did not display properly. What fixed my problem was checking the tab spacing. this is the only point in the video where Tom forgets to leave an empty line after moving to a new code segment affecting a "different" part of the code, the elif added on line 14 "elif current_collider:" (at this point in the vid 5:51) should be in line with the if statement on line 8 "if is_colliding() and..." (at the same timestamp) if it lines up with the wrong if statement funny stuff starts happening. This might not help at all, and it's been like 10 months, but still worth eliminating the easy fixes. Hope this helps and if not, I hope this message gives you a bit of extra motivation on your game dev journey.
@Mrpaul20
@Mrpaul20 4 года назад
THANK YOU SO MUCH FOR THE TUTORIAL SIR ITS HELP ME A LOT
@CodeWithTom
@CodeWithTom 4 года назад
You're welcome 😊
@windowpanememberrrr
@windowpanememberrrr 10 месяцев назад
On my interactable lightswitch script, i keep getting an 'unexpected identifier in class body' error for the exported variables. The scripts are exactly the same from mine to the one shown. Any ideas?
@Funtaman
@Funtaman 2 года назад
Hi Tom. I really like your Godot tutorials. They are awesome! I'v bin looking at many tuts and I have yet to find tuts that are very well explained as yours. I want to request a tut on how to make a loading screen with a progressbar. There are a few on RU-vid but they don't go in detail. Could be nice to see a menu scene where you press start then go to loading screen.. loading.. and then go to a new scene.. thanks for nice tutorials. Have a great day
@ZakRahman
@ZakRahman 3 года назад
Excellent series Absolutely brilliant.
@wiktorwektor123
@wiktorwektor123 3 года назад
1. Just press Ctrl+D on node to duplicate it. No need to search again for the node already in scene. 2. If you deleting whole new script and leaving only "extend" keyword line just set Template: None when creating script. You will save time.
@vickyboi1200
@vickyboi1200 4 года назад
are you going to upload more vids?
@321357w
@321357w 4 года назад
Hi Tom, just wondering if you have had the time and opportunity to do a tutorial on an interactive door as my strength is more with 3d modelling than actual code.
@retrotechnical9294
@retrotechnical9294 4 года назад
sir you are awesome i found gold in your tutorial
@user-wy7oh6tg1e
@user-wy7oh6tg1e 5 лет назад
finally a new video!
@CodeWithTom
@CodeWithTom 5 лет назад
Hope you enjoyed it!
@mellowcool6462
@mellowcool6462 4 года назад
pls men make more videos
@panderz_gg
@panderz_gg 2 года назад
Great tutorial overall. Sometimes a bit fast though.
@n._x3319
@n._x3319 2 года назад
your amzing
@barrycelliers4552
@barrycelliers4552 3 года назад
pls tell boute crouch wepon change and meele wepons
@bkaunghtet8425
@bkaunghtet8425 4 года назад
Thank You for This tutorial sir. it helped me alot.
@CodeWithTom
@CodeWithTom 4 года назад
You're very welcome
@lemongummy7047
@lemongummy7047 4 года назад
Great tutorials!
@jlewwis1995
@jlewwis1995 5 лет назад
you should make a tutorial on view bob, recoil, and aiming down the sights :) Oh and basic enemy AI as well
@CodeWithTom
@CodeWithTom 5 лет назад
Head bob has been requested a few times so I'll do that soon 😁
@drbackrooms2205
@drbackrooms2205 2 года назад
Can someone help me with the "If is_colliding() and collider is interactable:" Here say "error(13,38): The identifier "Interactable" isn't declared in the current scope" Please someone help me i tried to fix more than 100 times
@benjeminpenguin5764
@benjeminpenguin5764 2 года назад
Don't know if you ever figured this out, but try saving the scripts (ctrl + S)
@kulak8548
@kulak8548 Год назад
Did you add var collider = get_collider() at the top of _process(delta)?
@p2bh506
@p2bh506 4 года назад
Sir, Where is the rest of the videos???
@moric4677
@moric4677 5 лет назад
shortcut for Duplicate objects is ( ctrl + D)
@CodeWithTom
@CodeWithTom 5 лет назад
I might do a video on Godot keyboard shortcuts 😁
@cenullum
@cenullum 4 года назад
Can you make cull masking the weapon so we can see it while inside wall
@CodeWithTom
@CodeWithTom 4 года назад
I'll add it to my list :)
@DawidFreeman
@DawidFreeman 5 лет назад
Very good tutorial pls do more if you can
@CodeWithTom
@CodeWithTom 5 лет назад
Thank you I will 😁
@FenyEro
@FenyEro 4 года назад
It's so simple especially since I can barely speak English, I almost said to myself forward the codes to you now comes the set_get_interactionsgetyield("getLighttexr(Pi.get_lighttextifon(lightisOn.if!).get_transform(Vector3.direction))"), and who knows this memorize? the developers and 3-4 man?
@holomode1357
@holomode1357 3 года назад
how to make actually bullets appear when you shoot?
@austinahuman7566
@austinahuman7566 2 года назад
Could i use this for dialog? Similar to puppet combo style games, where the name of the object comes up and a dialog box pops up on screen when i interact with the object
@ganeshsingh4702
@ganeshsingh4702 3 года назад
its saying Attempt to call function 'set_text' based on 'null instance' on a null instance plz help me
@Dragon20C
@Dragon20C 3 года назад
Hello tom, I was wondering if you have a recoil tut avaliable for the guns?
@pierrenagonio
@pierrenagonio 4 года назад
Great tutorial's man here. Sub is ON. Waiting for next godot tips. BTW, I wiil sell U next subject: try to use controller for your FPS. Tried but works in half. Only movement. No luck for camera with right stick :/ Looks like it's to hard for me to make controler like Dark Souls did.
@HelpMe-or1ki
@HelpMe-or1ki 5 лет назад
Could you continue with an online fps? thx
@CodeWithTom
@CodeWithTom 5 лет назад
I won't be adding online functionality during this series. However I will no doubt cover multiplayer in a future video. 😀
@problemletstalknoletschat2288
@problemletstalknoletschat2288 2 года назад
Does this still work in v3.4.4?
@brainblox5629
@brainblox5629 2 года назад
Hi Tom, I got a little problem. Referencing to my Interaction Label doesnt work, I always get an "attempt to call function ...in base null instance etc."
@turinturambar7806
@turinturambar7806 2 года назад
same lol
@Theinvalidmusic
@Theinvalidmusic 4 года назад
Got to say, I'm a little puzzled as to what you did to get this to work. I followed the tutorial to the letter, but when declaring 'Interactable' as a class, Godot threw an error back saying that it was already declared due to me creating the script. This then resulted in Godot refusing to reference the class as part of the InteractionRaycast. Now I'm an absolute novice when it comes to this stuff, but surely that can't be right?
@sergeiorlov5096
@sergeiorlov5096 3 года назад
Dude, same exact issue. and I dont think that neither Tom nor anyone else will ever help us with this issue... Have you found out the sollution that you can point at ?
@bitmammothOG
@bitmammothOG 4 года назад
how would we go about adapting this to third person, I know its similar but would the raycast be attached to the player model head instead of camera directly?
@wulfric_2
@wulfric_2 4 года назад
It would probably work with the RayCast stuck to the camera still as long as you are aiming at it but try both ways to make sure
@Simplisti.
@Simplisti. 4 года назад
Lmao, i just realized everytime a problem occurs during this tutorial, i make a comment, and then like 30-60 seconds later, i resolve it without even going online, or getting a reply. Then I delete the comment. Basically, I'm increasing my brain power and getting good at resolving problems *kind of* because of the tutorial. # End of line
@sarahbuti6959
@sarahbuti6959 3 года назад
it doseintwork
@alekosthecrow
@alekosthecrow 4 года назад
How can I make an automatic weapon? if it extends the weapon script, I can't hold left click so do I need to copy the entire script and change the "is_action_just_pressed"?
@wulfric_2
@wulfric_2 4 года назад
you can do that or you can change the weapon scripts button to be is_action_pressed and make the fire rate really low and probably a few other things to make it work more like a automatic
@gdmattartz3071
@gdmattartz3071 4 года назад
in my screen the interaction_label.set_text("") on func set_interaction_text(text) is not working it gives me an error said Attempt to call function 'set_text' in base 'null instance' on a null instance. anyone knows why? Edit: now i fixed it then my problem if i interacted another object it shows an error like the interaction_label.set_text??????
@CodeWithTom
@CodeWithTom 4 года назад
Hi GD, make sure you're not trying to call a function on a non-interactable object using the "object is Interactable" syntax as shown in the video.
@gdmattartz3071
@gdmattartz3071 4 года назад
@@CodeWithTom Thanks!
@drbackrooms2205
@drbackrooms2205 2 года назад
@@CodeWithTom can you help me with the "If is_colliding() and collider is Interactable"
@drbackrooms2205
@drbackrooms2205 2 года назад
It says the identifier "Interactable" isn't declared in the current scope
@mickeykais8148
@mickeykais8148 4 года назад
collider in Interactable always returns false. :(
@CodeWithTom
@CodeWithTom 4 года назад
Try "collider is Interactable" 😁
@thegamebums6791
@thegamebums6791 4 года назад
For a second I was busy getting mad that the scripts weren't working and blaming u for it. Turns out that i just dumb and turns out that I just spelt something wrong
@CodeWithTom
@CodeWithTom 4 года назад
Haha it happens :D
@unworthy.potato
@unworthy.potato 3 года назад
For me 17:07
@juliusdamian1795
@juliusdamian1795 4 года назад
6.30 6:30
@user-yf5un7kj1p
@user-yf5un7kj1p 9 месяцев назад
your tutorial doesnt work it was something about "couldent pars global class interactable"
@spurdojenkins1932
@spurdojenkins1932 3 года назад
You're doing it wrong. Everything needs to be it's own scene.
Далее
OBLADAET - BARMAN
03:06
Просмотров 267 тыс.
Cute kitty gadgets 💛
00:24
Просмотров 2,9 млн
Godot 4: how to implement interfaces in GDScript!
1:00:16
Every UI Node Explained in 12 Minutes !
12:56
Просмотров 46 тыс.
6 Tips to Better Organize your Godot Projects
11:39
Просмотров 134 тыс.
Interact with Objects in your World in Godot 4
9:25
Просмотров 15 тыс.
INVENTORY & ITEM SYSTEM in Godot
50:30
Просмотров 56 тыс.
13 ADDONS to SPEED UP your game creation in GODOT!
11:23
Godot 4 - Tiled Dungeon Environment From Scratch
26:24
Просмотров 410 тыс.
How to Add Interaction in Godot 4
16:48
Просмотров 12 тыс.
Making a game about lil guys is fun and hard
12:10
Просмотров 151 тыс.