hi, i want to make a my project to contain multiple melee weapons (e.g) knife, pipe and etc. because them item are different sizes they would have different length sphere trace and damage .
so far I can pick up a knife and drop it if want pipe and i very doubt that sort of thing belong in the character_BP. I tried making the sphere trace inside the weapon_BP but it doesn’t work. I hope someone can guide me with this challenge
I could probably help you find a tutorial for this, if you could specify what kind of game you’re making? A first-person game will use a different method from a third-person game, at the very least. Though, you will certainly want the weapons to be their own actors, and use “Attach Actor to Actor” and input the character’s hand socket to attach to.
Give us some more info and let’s see what we can find!
hi thank you for responding. my project is like the classic silent hill game, so far I can pick up the weapons but no line trace or damage and idk what I’m doing wrong
Without a lot more information, such as what you’ve already done, pictures of your code, and so on, it’s hard to tell you what you’re doing wrong.
These two tutorials should give you enough information to do what you’re attempting- after you have watched these and tried to follow along, if you bring us pictures of your code when you hit a road block we can try to help!
Disclaimer: These links are not associated with Epic Games, Unreal Engine, or their partners.
Hey, that all is looking pretty great. Maybe make the Damage Amount on the Deal Damage node to 1.0 instead of 0.0.
So what exactly is going wrong now? Examples, pictures, videos are helpful! Use “PrintString” nodes to test where in the code the Execution Line (White line) is stopping!
hi sorry i had to start fresh in my prject adn i got back the anim but i still cant get the line trace to work but it only saying these arnt working and idk why
Well, error messages usually tell you why, if you know how to speak their weird language! What did the error message say specifically? One of the beauties of coding is that when something goes wrong, if programmed well it will tell you the reason.
This picture by itself means very little. All I can see is that there are two animNotifies triggering Events on the Third Person Character intended to start and end the melee trace. You have to show more pictures following that thread! First try putting a PrintString between the AnimNotify events and the “Start/End Melee Trace” nodes to check that the AnimNotify’s are going off! Then if that’s confirmed we can go from there.
But first things first… that error message, specifically!
it says "Blueprint Runtime Error: “Accessed None trying to read property As BP Third Person Character_0”. Node: Start Melee Trace Graph: EventGraph Function: Execute Ubergraph ABP Quinn Blueprint: ABP_Quinn
I’m not sure what i can do form here i followed the video
This means “We’re trying to reference this variable and it’s empty”
So you need to go to where you’re setting this value (probably on the BeginPlay event) and take a picture there so we know it’s getting set correctly! It might be on Manny instead of Quinn. (Quinn has everything Manny does, but Manny does NOT have everything Quinn does)
As you see here the owning actor is cast to Character, and then a reference is set. Now you could do “As Character”.
Somewhere in your ABP there has to be a cast to Third Person Character, correct? Then you make the variable “As Third Person Character” for calling on the events. Where is that happening?