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
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!
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.
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.
@@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
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
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!
@@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.
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.
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
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!
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.
@@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.
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.
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?
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.
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.
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?
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
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.
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.
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
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?
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
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.
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."
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?
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 ?
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?
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
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"?
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
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??????
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