КОМЕНТАРІ •

  • @Chaff_Games
    @Chaff_Games 10 місяців тому +63

    This is a compilation of all my tutorials so far combined into one. So you don't have to go hunt down the other videos.

    • @meezi2987
      @meezi2987 10 місяців тому +2

      Ok I understand thank you👍

    • @notimportant3033
      @notimportant3033 10 місяців тому +5

      Can you add chapters to this video if we want to scroll to a specific one?

    • @Chaff_Games
      @Chaff_Games 10 місяців тому +8

      @@notimportant3033 yes I should have done that sorry. Will do as soon as I get home.

    • @notimportant3033
      @notimportant3033 10 місяців тому +3

      @@Chaff_Games It’s okay man, thanks

    • @Luckypoe
      @Luckypoe 9 місяців тому

      👍

  • @ahmed_mo2nis_productions
    @ahmed_mo2nis_productions 10 місяців тому +6

    I have been following your tutorials for some time. Thank you for everything

  • @shabbyowo
    @shabbyowo 6 місяців тому +2

    Wow, I didn't know there was a compiled version of the videos. I'm so glad I found it! TY :)

  • @limax2107
    @limax2107 9 місяців тому +1

    you are a life saver, this channel deserves more suscribers.

  • @Luckypoe
    @Luckypoe 9 місяців тому +9

    Thank you so much for your work, Know that you helped your example a lot because you gave a general picture of how to do it! Your channel deserves a lot more subscribers and views!

  • @genericjames7949
    @genericjames7949 7 місяців тому +3

    I love this because its not super beginner but does a very good job of showing what to do and why.

  • @D.E.Nicolas.Goncalves
    @D.E.Nicolas.Goncalves 9 місяців тому +1

    a lot of insight while watching, Thanks for the gold!

  • @realjames1
    @realjames1 10 місяців тому +9

    truly a giga chad, well done chaff

  • @RS-HAIR
    @RS-HAIR 8 місяців тому +1

    Thank you for share ❤

  • @FarSam25
    @FarSam25 9 місяців тому +1

    Thank you so much

  • @Snapper-gaming
    @Snapper-gaming 5 місяців тому +9

    For everyones sake, I think you should add this to the description of the video, or edit your pinned comment and add this:
    Add a tag of which type your variables is, it really help soooo much when coding in godot. For example.
    var Current_Weapon : Weapon_Resource = null
    By adding : Weapon_Resource, godot will now show you auto completion everytime you refer to this variable. :)

    • @Chaff_Games
      @Chaff_Games 5 місяців тому +3

      Oh yeah how good is typing now. Back when I made this it was still done a lot less. 3.5 days barely anyone did. And now I would consider it mandatory, it gives you a lot of extra help.

  • @meezi2987
    @meezi2987 10 місяців тому +4

    Very good idea🤩🤩 this is a conglomeration of individual episodes or no???

  • @cmds.learning7426
    @cmds.learning7426 10 місяців тому +2

    AMAZING

  • @savorsauce
    @savorsauce 2 місяці тому

    Something I would like to see added to this video is for the weapon pick up section. In the video the script takes a selection of variables that you have to hardcode in for each spawnable item. I would recommend changing this to accept the resources directly, as it prevents potential user error. The change is as simple as replacing the @export variable declarations with @export weapon: Resource. Then you can access each variable with weapon.ammo or weapon.weapon_name. Hope this helps!

  • @Encpc
    @Encpc 5 місяців тому +1

    Thanks bro

  • @ItsLars2828
    @ItsLars2828 7 місяців тому +1

    Amazing video, a few thoughts:
    - how could I go about starting or switching to unarmed?
    - how I could implement picking other things up (swords) and using them

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      Same as anything. For un armed you can create a resource for it. Obviously, it can’t be dropped 😂. Swords and melee weapons would be the same however, you might need to customise the shoot function to support a third way of detecting a hit. I do my melee strike with a simple 1 meter ray cast. Which would not be sufficient for a game based on melee weapons like swords. I would look into using an area3d to detect the space in front of you. Or more advanced continuous ray cast along the weapon to detect a strike

  • @DaShizi
    @DaShizi 4 місяці тому +1

    Good vid

  • @Pootisbird69
    @Pootisbird69 9 місяців тому +3

    17:54 yeah obviously. SPIN FOR THE WIN!!!

  • @artiop7687
    @artiop7687 9 місяців тому +1

    THANKS a very good and complete tutorial very well explained don't copy paste you learn how to do

  • @Fearlez_11
    @Fearlez_11 9 місяців тому +3

    "if it's working, it's working..even though the code is messed up" :P

  • @dootydut
    @dootydut 5 місяців тому +1

    25:31 - Saving my spot for later.

  • @MECHA-TED
    @MECHA-TED 2 місяці тому

    would you be able to do a tutorial on Red Orchestra style freeaim deadzone (where the gun moves separate from your camera) ?

  • @Adam-gk4pv
    @Adam-gk4pv Місяць тому +1

    Not sure if you ever cover it in another video, but how would you go about adding a bullet hole decal system to replace the hit markers? I've seen other people use a ray cast as a child of the camera node, and from there they get the collision normal and rotate the decal accordingly. The ray you created in this system detects intersections using code so it's a bit different, but would bullet hole decals it still be possible?

    • @Chaff_Games
      @Chaff_Games Місяць тому +1

      The information from the second ray cast should be enough to do such a thing, it carries the exact same information. I create a very basic hit decal in this video. However I believe the way I do it may be a bit outdated. There is a decal node that I have not yet played around with that may be more useful for displaying a bullet hole.

  • @leerpret3950
    @leerpret3950 8 місяців тому +1

    * print with `print("Health is: ", health)` (instead of concatenating with +), then you dont have to do string(health)

    • @Chaff_Games
      @Chaff_Games 8 місяців тому

      That’s interesting. Thanks for pointing out.

  • @ElGhost-p6t
    @ElGhost-p6t 7 місяців тому +2

    28:24 Hi, I was typing your code when out of nowhere on line 29 the message 'Invalid get index '0' (on base 'Array)' appears, what should I do?

    • @Chaff_Games
      @Chaff_Games 7 місяців тому +1

      Hey, what do you have on line 29? An invalid get index normally means whatever you’re requesting is non existent. Jump in the discord if you want to post screenshots and we can get you up and running

  • @Fuckbro100
    @Fuckbro100 7 місяців тому +2

    Im so gonna watch this... just later

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      There’s individual episodes if you want to pick through them individually. I have a playlist on my channel

  • @javi1988
    @javi1988 8 місяців тому +1

    Excelent tutorial. Coukd you do the same but for 2d?. Thanks

    • @Chaff_Games
      @Chaff_Games 8 місяців тому +1

      Hey, thanks ☺️. I don’t really do too much 2d these days but miziziziz put out a tutorial recently ua-cam.com/video/UYQfVx1EIW8/v-deo.htmlsi=mVwYoZ8fhFeM8fRa

  • @MonkeyWrench28
    @MonkeyWrench28 6 місяців тому +1

    I get the error "Invalid index type "String for a base of type "Array"." for the Change_Weapon function:
    func Change_Weapon(weapon_name: String):
    Current_Weapon = Weapon_Inventory[weapon_name]

    • @Chaff_Games
      @Chaff_Games 6 місяців тому

      Hey, Check the declaration of the Weapon_Inventory, it should be declared as a Dictionary. Not an Array.

    • @MonkeyWrench28
      @MonkeyWrench28 6 місяців тому

      @@Chaff_Games that works now, thanks!

  • @subhi7956
    @subhi7956 Місяць тому +1

    i really need help
    at 40:20
    the game keep crashing , says breakpoint at function ready, i don't know what is wrong, i did everything just like you but...
    also i deleted everything from the hud script to signals and disconnected them and did everything again and still crashing
    i have godot 4.2

    • @Chaff_Games
      @Chaff_Games Місяць тому +1

      Maybe try removing the break point? Look for a red dot on the side of your script then click it.

  • @klaatubarada6200
    @klaatubarada6200 5 місяців тому

    Hello Chaff! My hitscan and projectiles weapons are not shooting to the center of the screen, they go straight from weapon position. What am I doing wrong? Thanks

    • @Chaff_Games
      @Chaff_Games 5 місяців тому +1

      The first thing that comes to mind is the direction math that is done at the start of the projectile function. But if hitscan is doing that as well, I’m not too sure. First time I’ve heard that. Are you using a custom resolution for retro games?

  • @gugerruder9867
    @gugerruder9867 Місяць тому +1

    I have a problem that the scene is restarted, but the value in the weapon, for example, the current ammo or reserve ammo are not returned

    • @Chaff_Games
      @Chaff_Games Місяць тому

      That's not covered in this video. You could do it with a singleton.

  • @Yoni123
    @Yoni123 9 місяців тому +1

    Will you do enemies next?

  • @phoeniciandiaspora4584
    @phoeniciandiaspora4584 7 місяців тому +1

    48:04

  • @Jeepers.Kreepers
    @Jeepers.Kreepers Місяць тому +1

    im done with camera and movement, but whenever i run it, it says not responding. anything i can do to fix this?

    • @Chaff_Games
      @Chaff_Games Місяць тому

      Haven’t seen that before, are you getting any feedback from the engine as to why

  • @sugoidxth
    @sugoidxth 6 місяців тому +3

    I don't expect you to reply, and I do apologise if the answer is in the video - but I'm just asking ahead because I won't be doing this anytime soon so I'm just asking incase you can answer.
    Does the FPS system work with other camera/movement systems or is it somehow crucially tied to the one you made in this video?

    • @Chaff_Games
      @Chaff_Games 6 місяців тому +1

      In this tutorial I don’t touch the camera except to move it with the mouse. So if you wanted to have some other set up it will be fine.

    • @sugoidxth
      @sugoidxth 6 місяців тому +1

      @@Chaff_Games Thank you very much for the reply!
      Alright, thanks!

  • @savorsauce
    @savorsauce 2 місяці тому +1

    I didn't see you show or answer this question, what are the layer and mask for the characterbody? I think that my bullet projectile is somehow colliding with my player, and I don't want that to happen.

    • @savorsauce
      @savorsauce 2 місяці тому +1

      For anyone interested I set the layer to player, and the mask to world and player and it worked.

    • @Chaff_Games
      @Chaff_Games 2 місяці тому

      Good point. I talk about the layer concerns for projectiles at 1:12:46. I provide very general advice on the problem, however, I do not say what layer the player is on. You're solutions below is how it is set up.

  • @Maxschellenberg
    @Maxschellenberg 6 місяців тому +2

    I am using godot 4.2 and no script templates showed up when I followed your instructions from the start. Any clue what I can do?

    • @Maxschellenberg
      @Maxschellenberg 6 місяців тому +1

      I had to rename the character3d node first.

    • @Chaff_Games
      @Chaff_Games 6 місяців тому +1

      Hmmm, that’s not something I’ve had to deal with before. Is there an editor setting maybe?

    • @kimo1582
      @kimo1582 6 місяців тому

      Thank you sir, same issue for me.@@Maxschellenberg

  • @s3nju279
    @s3nju279 9 місяців тому +2

    does the gun recieve shadows or are you moving it out of the way when you walk too close to walls?

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      In this series i don’t implement any view model clipping solutions. The models should receive all lighting information including shadows.

    • @s3nju279
      @s3nju279 9 місяців тому +1

      i apologize i see you have a video on how to get camera to show but also receive light. gonna give that a watch here in a bit. this is a good set up.@@Chaff_Games

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      @s3nju279 I’m making an update as well. I think in godot 4 the subviewport does not show shadows.

  • @thegrayson
    @thegrayson 3 місяці тому +1

    I'm at the hitscan portion of the tutorial and am getting a weird issue (godot 4.2.1). Despite weapon range set to 2,000, I only get hit detection within like 3 meters. However, at ten meters away, I only get hit detection if I move my mouse over the target, but I only get one hit detection before I have to move my mouse again to get another. And If I WASD maneuver my reticle over the box, I dont get any more hits until I move my mouse. My code seems identical, but I'm prone to overlooking things. I'll continue with the tutorial and maybe you'll address it at some point or I figure it out. I'll update this comment.

    • @Chaff_Games
      @Chaff_Games 3 місяці тому

      That’s the first I’ve heard of that. Jump on the discord and we can try and figure it out

    • @thegrayson
      @thegrayson 2 місяці тому

      @@Chaff_Games I went on vacation and didn't get to reach out, but I just figured it out though!! I had both the camera height and player capsule height at the same height. This lead to it sometimes thinking was colliding with my own head. TLDR Make sure the camera is INSIDE the player collision shape like you had it or you get very weird ray casting behavior. Cant wait to continue with the tutorial now lol

  • @sega2333
    @sega2333 6 місяців тому +1

    great video and lesson thanks, but I have an interesting problem. I noticed that bullets (projectiles of a weapon firing projectiles) They repeat some of the character 's Input when they lie on the ground after a shot , like jumping and walking . I have no idea why at all.

    • @Chaff_Games
      @Chaff_Games 6 місяців тому

      Hey there, the reason for this is that the rigid body projectile needs to be set as top level. If you don’t do this then the projectile will follow the transform of the player.

    • @sega2333
      @sega2333 6 місяців тому +1

      @@Chaff_Games excuse me I'm a beginner for that , but where is top level the bullet in our separate scene, or are you talking about something else

    • @Chaff_Games
      @Chaff_Games 6 місяців тому

      check at 1:11:50

    • @sega2333
      @sega2333 6 місяців тому

      @@Chaff_Games Damn, I missed it. Yes, everything worked fine, thank you very much

  • @gli7ch240
    @gli7ch240 4 місяці тому +1

    Hey im javing trouple importing your zip file to a new project of mine. I recently doscovered your project file template online and relized it is perfect for what i want. I download it and go into godot then i import the zip file as a new peoject all the files load on but the project doesnt load it says missing dependency of character controller. Plz help.

    • @Chaff_Games
      @Chaff_Games 4 місяці тому

      Are you trying to load on an android device? It’s the only place I’ve encountered that error. Which seemed to go away when I closed and re opened.

    • @gli7ch240
      @gli7ch240 4 місяці тому +1

      @@Chaff_Games yes I actually am making a mobile fps zombies on my phone using godot mobile and it worked when I loaded again 🤣 I can't believe I didn't just try again I'm dumb thanks for the feedback you earned a sub.

    • @Chaff_Games
      @Chaff_Games 4 місяці тому

      Thanks, no problem. Best of luck.

  • @meeeaCH9612
    @meeeaCH9612 9 місяців тому +1

    Guys if you add this line to the end of the pick up detection:
    if body.pick_Up_Type == "Ammo" && weapon_Stack.find(body.weapon_Name,0) != -1:
    body.queue_free()
    then it will remove the clip, after the pick up and you won't pick up the clip, if you don't have the gun for it.

  • @user-zb2yt3fw5k
    @user-zb2yt3fw5k 6 місяців тому +1

    At around 39:24 I got a problem. When using the signal I get this error after launching the game: Invalid call. Nonexistent function 'set_text' in base 'Nil'. Any ideas?

    • @daniloffszz
      @daniloffszz 6 місяців тому +1

      xd, too
      do you found solution?
      upd: I found core of error. signal is works faster than @onready -> variable is null
      upd2: I moved declaring variables in to the functions. its work correctly. but i dont think is good solution. reply me if you find better solution.

    • @user-zb2yt3fw5k
      @user-zb2yt3fw5k 6 місяців тому

      No I found nothing @@daniloffszz

    • @user-zb2yt3fw5k
      @user-zb2yt3fw5k 6 місяців тому

      how did you fix it @@daniloffszz

    • @Chaff_Games
      @Chaff_Games 6 місяців тому

      Hey, the easiest way to fix this is to make sure that your canvas layer is above the weapon manager. The scene is created top to bottom when the game starts so if it's above the weapon manager then it will exist when the signal is emited. You could always put a time delay on the first emission as well.

    • @user-zb2yt3fw5k
      @user-zb2yt3fw5k 6 місяців тому

      @@Chaff_Games I fixed it by declaring the variable in the CanvasLayer Script. Thanks though!

  • @yee2343
    @yee2343 7 місяців тому +1

    hey chaff! this is a really helpful tutorial, but I'm having one issue. for the hud code, I followed what you had coded closely but a issue has arisen. The Ammo label has a breakpoint. I do not know what it is, or why it isn't showing the ammo. If you need me to, I can post the code its self and maybe you can help fix the issue. I know being a dev and a youtube can be quite busy and I understand if you cannot reply to this comment immediately or at all. Anyways, hope you had a wonderful holiday.

    • @Chaff_Games
      @Chaff_Games 7 місяців тому +1

      Hey, happy to help. Jump on the discord and send me a message.

    • @yee2343
      @yee2343 7 місяців тому +1

      @@Chaff_Games will do, is there a channel you want me to send it in? or would you want a direct message?

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      @yee2343 I just made a channel called tutorial help

    • @yee2343
      @yee2343 7 місяців тому

      @@Chaff_Games alrighty thank you!

  • @kiryD
    @kiryD 9 місяців тому +3

    HitScan hits itself what do i have to do

    • @kiryD
      @kiryD 9 місяців тому +2

      got it. my wrong
      project_local_ray_normal >> project_ray_normal
      Thanks for ultimate guide

  • @SamuTheFrog
    @SamuTheFrog 2 місяці тому +1

    MOUSE SENSISITIVY

  • @trashmosh
    @trashmosh 4 місяці тому +1

    how would you add full body models for multiplayer?

    • @Chaff_Games
      @Chaff_Games 4 місяці тому +1

      You would need a few things. For the other players you would need an animated rig and a way to sync the animations across the server. I’ve never done that before.

    • @trashmosh
      @trashmosh 4 місяці тому +1

      @@Chaff_Games would full body be on another and how would you code the animation

    • @trashmosh
      @trashmosh 4 місяці тому

      layer*

    • @Chaff_Games
      @Chaff_Games 4 місяці тому

      @trashmosh sorry not sure. I have not explored that yet.

  • @AeolisticFury
    @AeolisticFury 8 місяців тому +1

    Help, I followed everything in the tutorial but for some reason I always hit the player CharacterBody3D as the first and only collider. So the Hitscan and projectiles dont work...

    • @Chaff_Games
      @Chaff_Games 8 місяців тому

      Hey, Thanks for your patients. I tried to re create this issue but I was only able to hit the player collision if I move the collision shape in front of the player. Nevertheless, you can add the code New_Intersection.set_collision_mask(0b11111101) to exclude the player. Assuming the player is on the second layer. Add this right below where you create the physics ray query parametre. Thanks.

    • @tmilker
      @tmilker 7 місяців тому +1

      @@Chaff_Games I ran into this issue too with Godot 4.2. I don't know if this person is doing the same thing but I had switched to the Jolt Physics engine(going to be the default in the future). Something is different and causes the raycasts to hit the player even though my bullet point is clearly forward of the player's collision shape. Once I changed it back to the default physics, it worked fine. I'll do some more debugging and see if I can figure out what it is.

    • @tmilker
      @tmilker 7 місяців тому +1

      I think it's that Jolt raycasts are more accurate than the built-in physics engine. When the player looks down below level with the horizon, the bullet point gets rotated inside the player's collision shape. Jolt apparently detects collisions that begin within a collision shape and exit them as a collision, where the built-in engine does not. That's my current guess at least. I think the correct solution is to use a mask like you suggested.

    • @swordofglass
      @swordofglass 6 місяців тому +2

      @@tmilker I actually figured out what this is. Jolt 0.10 and under, you have to set new_intersection.hit_back_faces = false - they fixed this in the latest version of the engine in 0.11 so you should probably just update

    • @tmilker
      @tmilker 6 місяців тому

      @@swordofglassThanks, that certainly explains things! It appears Jolt version doesn't matter because I just checked and by default hit_back_faces is still set to true. (I was already using 0.11)

  • @ItsLars2828
    @ItsLars2828 7 місяців тому +1

    Hi There, what is the license for the code / tutorial etc? Just before I start! Thanks

    • @ItsLars2828
      @ItsLars2828 7 місяців тому +1

      And also wondering about the assets / project file. What the license is for that / if we can use it (credit). Thanks :)

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      MIT

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      If you download the file, I use kenney.nl assets, which are all CC0. The code is all MIT. So nothing in the project requires credit.

    • @ItsLars2828
      @ItsLars2828 7 місяців тому +1

      @@Chaff_Games great and how can I credit to the MIT lisence?

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      @@ItsLars2828 You don't need to.

  • @Yoni123
    @Yoni123 9 місяців тому +1

    How did you make the map)

    • @Chaff_Games
      @Chaff_Games 9 місяців тому +1

      It’s just a grid map with assets from www.kenney.nl/assets

  • @b0gie
    @b0gie 7 місяців тому +1

  • @RprtBak
    @RprtBak 9 місяців тому +1

    Wish someone did this for C# lol I have the worst time using C# in Godot, I just can't fucking figure out half the shit. I might have to stick with Unity or Unreal :| but I don't want to

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      Nothing wrong with gdscript. But i Guess it depends on what you’re making.

  • @rankerhowl9910
    @rankerhowl9910 9 місяців тому +1

    How do I find out how you made the initial world

    • @Chaff_Games
      @Chaff_Games 8 місяців тому +1

      It’s just a grid mesh. I don’t have a video on, sorry .

    • @vcd200044
      @vcd200044 8 місяців тому +2

      @@Chaff_Games Cool. Could you provide the starting project that only has the initial world? I want to follow your tutorial step by step.

    • @Chaff_Games
      @Chaff_Games 8 місяців тому +1

      @vcd200044 I’ll look at uploading in the next day.

    • @Chaff_Games
      @Chaff_Games 8 місяців тому +2

      @@vcd200044 github.com/chafmere/ultimate-FPS-Tutorial-Godot-4

    • @vcd200044
      @vcd200044 8 місяців тому +1

      @@Chaff_Games Thanks for your update!😆

  • @exploringbiblicalendtimes779
    @exploringbiblicalendtimes779 9 місяців тому +1

    I did all the things for camera and keep getting errors for some reason even though I copied you. I have tried so many tutorials for camera mouse and can never get it for some reason.

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      What kind of error are you getting?

    • @exploringbiblicalendtimes779
      @exploringbiblicalendtimes779 9 місяців тому +1

      @@Chaff_Games Dosent matter now cause I deleted it. It would just say things like it wasn't declared or something like that on certain lines

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      @@exploringbiblicalendtimes779 well if you need more help, jump in the discord and we can walk through it.

  • @slavnight242
    @slavnight242 9 місяців тому +1

    At 9:33 i get an error in line 23 and 30. I did exactly what you did

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      What’s the error?

    • @slavnight242
      @slavnight242 9 місяців тому

      @@Chaff_Games
      But i have MainCamera as a child node of CharacterBody3D:
      0 - res://scripts/player_controls.gd:30 - at function: CameraLook
      1 - res://scripts/player_controls.gd:23 - at function: _input
      player_controls.gd:3 @ _ready(): Node not found: "$MainCamera" (relative to "/root/world/CharacterBody3D").

    • @aleccarpenter439
      @aleccarpenter439 7 місяців тому +1

      I'm actually having a similar problem with this lol. It's saying Node not found: "%MainCamera" (relative to the Character Body
      @@Chaff_Games

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      Try taking out the %. Or just re initialise the camera node variable for your particular project. I used an old method or alternative method that can be confusing for new comers.

    • @aleccarpenter439
      @aleccarpenter439 7 місяців тому

      Yeah. Removing the % sign did it and I was able to troubleshoot it. I'm learning a ton and thank you so much@@Chaff_Games

  • @revenant131
    @revenant131 7 місяців тому +1

    im struggling getting it to boot after adding the weapon manager. I am getting a breakpoint error. I think I Have everything setup correctly. my animations are in a library so it would be p90/activate. Breakpoints are at line 20 so "Initialise(Start_Weapons)" and another at "Current_weapon = Weapon_list[Weapon_Stack[0]]"

    • @revenant131
      @revenant131 7 місяців тому

      I added p90 as a starting weapon but still am getting the breakpoint errors.

    • @Chaff_Games
      @Chaff_Games 7 місяців тому

      Hey there, what are the break points?

    • @revenant131
      @revenant131 7 місяців тому

      @@Chaff_Games here is an imgr link if thats ok. i.imgur.com/3hhv619.png

    • @revenant131
      @revenant131 7 місяців тому

      im an idiot. I didnt realise what Breakpoints where. I will try again now@@Chaff_Games

    • @revenant131
      @revenant131 7 місяців тому

      ok, I am getting "Invalid get index 'p90' (on base: 'Dictionary').

  • @skiffenderson3942
    @skiffenderson3942 8 місяців тому +1

    Player fall through the floor. Why?

    • @Chaff_Games
      @Chaff_Games 8 місяців тому

      Check your collision layers

  • @Aquafalcon
    @Aquafalcon 9 місяців тому +1

    Pls help.
    This is my weapon manager script
    var current_weapon = null
    var weapon_stack = [] # An array of weapons currently held by the Player
    var weapon_indicator = 0
    var next_weapon: String
    var weapon_list = {}
    @export var weapon_resources: Array[Weapon_Resource]
    @export var start_weapons: Array[String]
    func _ready():
    !Initialize(start_weapons) # Enter the state machine
    func Initialize(_start_weapons: Array):
    # Creating a dictionary to refer to our weapons
    for weapon in weapon_resources:
    weapon_list[weapon.weapon_name] = weapon
    for i in _start_weapons:
    weapon_stack.push_back(i) # Add out start weapons
    !current_weapon = weapon_list[weapon_stack[0]] # Set the first weapon in the stack to current
    enter()
    func enter():
    # Call when first "entering" into a weapon
    animation_player.queue(current_weapon.Active_Anim)
    func exit():
    # In order to change weapons first call exit
    pass
    Whenever I try to run the game I get the error
    Invalid get index ‘blasterB’ (on base: ‘Dictionary’).
    My errors are on the lines that start with ! 28:58

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      An invalid get index on a dictionary usually means that the variable you’re trying to get from the dictionary, isn’t there. So following the code, we know that there’s either a problem with the weapon lists creation, or there’s a mismatch of variables in either the weapon name or the starting weapons variables (which we are using to reference our dictionary). Check both of those and let me know how you go.

    • @Aquafalcon
      @Aquafalcon 9 місяців тому +1

      Changing the variable gives me a different error
      Invalid get index ‘Active_Anim’ (on base: ‘Resource (Weapon_Resource)’)
      Although deleting the line to queue the Active_Anim gets rid of the errors

    • @Chaff_Games
      @Chaff_Games 9 місяців тому

      Does that variable exist in the weapon resource? I named it Activate_Anim. Renaming is obviously fine but make sure they match otherwise this error will present itself.

    • @Aquafalcon
      @Aquafalcon 9 місяців тому +1

      Thank you so much!
      I wrote active_Anim instead of activate_Anim
      Definitely subbing ❤️❤️❤️

  • @Hey-ur7bl
    @Hey-ur7bl 5 місяців тому +1

    hitscan is no working

    • @Chaff_Games
      @Chaff_Games 5 місяців тому

      Works fine for me 😂. Jump on the discord if you need some help finding where you’ve went wrong.

  • @Txlr_Nz
    @Txlr_Nz 8 місяців тому +1

    why not use deg _to_rad ( )

    • @Chaff_Games
      @Chaff_Games 8 місяців тому

      Thanks for the feedback. Could you please tell me at which point in the video you’re asking about?

    • @alexmcgreal836
      @alexmcgreal836 4 місяці тому

      @@Chaff_GamesBit late to the party but they are probably referring to the rotation of the camera controls.
      They way you've done it works fine, but by converting the degrees to radians you can use smaller numbers for neatness, it's how I've seen other people approach camera controls in other tutorials.

  • @TheMaskedPlayerr
    @TheMaskedPlayerr 5 днів тому

    Yo ima keep debugging it on my own but might aswell ask. At 40:14 I get the same error but my "@onready var"s are correctly set or atleast dont have the New part added. I tried dragging the node location like you demonstrated and typed it out aswell but neither are working. It is stuck on the exact same line as yours was on 40:14. Do you have any ideas why this could be?
    "
    @onready var CurrentWeaponLabel = $VBoxContainer/HBoxContainer/CurrentWeapon
    @onready var CurrentAmmoLabel = $VBoxContainer/HBoxContainer2/Ammo
    @onready var CurrentWeaponStack = $VBoxContainer/HBoxContainer3/WeaponStack
    "

  • @tiozloko1599
    @tiozloko1599 28 днів тому

    func _input(event: InputEvent) -> void:
    if Input.is_action_pressed("ui_cancel") :
    Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)

    if event is InputEventMouseMotion:
    rotation.y -= event.relative.x #horizontal
    rotation.x -= event.relative.y #vertical "Camera".rotation.x -= event.relative.y
    if event is InputEventMouseMotion:
    rotation.y -= deg_to_rad(event.relative.x * sensitivity)
    main_camera.rotation.x -= deg_to_rad(event.relative.y * sensitivity)
    #script full
    extends CharacterBody3D
    @onready var main_camera: Camera3D = get_node("main_camera")
    const SPEED = 5.0
    const JUMP_VELOCITY = 4.5
    var camera_rotation = Vector2(0,0)
    var sensitivity = 0.1
    func _ready() -> void:
    Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)


    func _input(event: InputEvent) -> void:
    if Input.is_action_pressed("ui_cancel"):
    Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)

    if event is InputEventMouseMotion:
    rotation.y -= deg_to_rad(event.relative.x * sensitivity)
    main_camera.rotation.x -= deg_to_rad(event.relative.y * sensitivity)
    main_camera.rotation.x = clamp(main_camera.rotation.x, -1.2, 1.2) #main_camera.rotation.x = clamp(main_camera.rotation.x, deg_to_rad(-90),deg_to_rad(90)

    func _physics_process(delta: float) -> void:
    # Add the gravity.
    if not is_on_floor():
    velocity += get_gravity() * delta
    # Handle jump.
    if Input.is_action_just_pressed("ui_accept") and is_on_floor():
    velocity.y = JUMP_VELOCITY
    # Get the input direction and handle the movement/deceleration.
    # As good practice, you should replace UI actions with custom gameplay actions.
    var input_dir := Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
    var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
    if direction:
    velocity.x = direction.x * SPEED
    velocity.z = direction.z * SPEED
    else:
    velocity.x = move_toward(velocity.x, 0, SPEED)
    velocity.z = move_toward(velocity.z, 0, SPEED)
    move_and_slide()

  • @daxtonzimmerman3091
    @daxtonzimmerman3091 9 місяців тому +2

    HELP!! PLEASE 24:46
    I typed and did exactly what it said but it gives me an error
    extends Node3D
    @onready var Animation_Player = get_node("FPS_Rig/AnimationPlayer")
    var Current_Weapon = null
    var Weapon_Stack = []
    var Weapon_Indicator = 0
    var Next_Weapon: String
    var Weapon_List = {}
    @export var _weapon_resources: Array[Weapon_Resource]

    • @Chaff_Games
      @Chaff_Games 9 місяців тому +1

      I just want to confirm you’re using godot 4? Because I’m pretty sure this error was present in other versions? Other than that double check the weapon resource and make sure name is the same and that it is a resource. And if all that is correct then, it should work, even the error message agrees with us (we are exporting a resource).

    • @daxtonzimmerman3091
      @daxtonzimmerman3091 9 місяців тому +2

      I just switched to 4.1 from 4.0 and it seemed to fix the problem. Thank you!@@Chaff_Games

    • @Chaff_Games
      @Chaff_Games 9 місяців тому +1

      hmmm perhaps this bug existed in Godot 4? I know it's a new feature but i thought 4 and up. perhaps i need to update the description. I'm glad it's working for you now.

  • @user-rl3vu2yn4z
    @user-rl3vu2yn4z 7 місяців тому +2

    porque cuando roto la camara me da error en transform.basis = Basis()
    MainCamera.transform.basis = Basis()

    • @Chaff_Games
      @Chaff_Games 7 місяців тому +1

      What is the error?