Hello. I have gotten stuck on the Calling The Shoot function I am unable to connect the Gun Location node to the Shoot node and I am unsure why. A quick response would be helpful as I’m on a small deadline.
Hello! In this point, you should be using the EquippedGun variable, defined earlier, not the Gun Location, as this node requires an object of type BP Base Gun and Gun Location is a coordinate.
Hope it works now! :]
Hello.
The tutorial is great overall, it seems impossible to find shorter and simpler solutions than the ones here, but I had 2 problems:
-
" Now, create a variable of type BP_BaseGun , and name it EquippedGun ." - I got stuck on this part for at least an hour because I couldn’t figure out what kind of a variable and where. Now that I discovered by accident that you can just type “BP_BaseGun” instead of “Float” as an actual variable type, I understand what is meant, but I still find it unclear. Initially, I also didn’t know if it was meant to be a part of the player or the gun, but I simply tried both and only the latter worked and matched the images in the tutorial.
-
The entire final part with damage is strangely missing from the tutorial, like it’s unfinished. It’s only shown how to make the gun shoot and deal damage in general, but specific things actually taking an amount of damage to their health from the player’s gun is simply not in the tutorial. Like, it suddenly says to open BP_Target which wasn’t mentioned before, then calling a “TakeDamage” function which also wasn’t mentioned before and so on.
I would also like to mention that collision needs to be disabled for the gun model because, at first, mine wasn’t positioned properly which completely broke movement and caused me to fly all over the place. When I moved it away from the player character, movement was fixed, but then if I looked down at the ground, it would cause a very high jump. As soon as collision was disabled, no problem. Just seemed like the logical thing ot do, so I did that, but still worth a mention.
Anyway, for some reason (my fault), my gun isn’t working. I enabled line trace (draw debug type > persistent), but no luck. I’ve been trying to figure it for hours, went through the tutorial, checked everything and I just don’t know what’s wrong. I have slightly different variable names (at least just temporarily), but everything else is the same. I would greatly appreciate it if you could point out the error if you see it because I really don’t, but if not, then no need to waste as much time as I did, no worries.
Here are screenshots:
Don’t mind the slightly different names of things, I did everything exactly the same.
I made sure fire rate isn’t 0 in the child class as it is for the parent class, but nothing else comes to mind. Everything seems the same, except it just won’t work.
Thanks in advance and keep up the good work.