TWeakObjectPtr is a weak pointer to the character. That means it doesn’t hold on to the character in memory. Meaning that if all other pointers are gone except this one, the character will still be deleted from memory. If we were using a regular pointer, it would be kept in memory until this last pointer to the character was removed too.
To get the pointer from a TWeakObjectPtr is done through .Get() like so: ASCharacter MyPawn = PawnInstigator.Get()* This returns the pointer IF it still exists, so make sure you check for nullptr after (if (PawnInstigator != nullptr) { }) before using it.
I don’t know why when clients shoots each other or shoots to server this function returns false but when server shoots to other returns true… Why this happens?
It checks if we are allowed to apply damage, which only happens on the server-side OR when the actor is torn off (bTearOff) from the server OR if the actor has authority to make changes, eg. to take damage.
I know that
But when I I test this code on your project everything was Ok server and clients can shoots to each other, but in my project that’s code not working I don’t know what’s wrong in my project, everything is like your project I’m using your project as a learning resources every things is same … I don’t know where I made a mistake.
I have a doubt that how to control the weapon’s force when its bullet hit the actor . i found that when I shoot the bomb, it will move. when i shoot the barrier, it can’t move. I did not find where to set the power of weapon hit.
i have another question about Skeleton socket . Different rifles have different Skeleton root causing the different result when attached to the same socket. how to sovle this problem except modify the source skeleton file? thank u…
Everything is available in the project files that you can download mate. The blood FX is from the ShooterGame sample, I re-used it for this project too.
Where did or does it create the STypes.h from? I am trying to understand how to create a file like this but the documentation I have read did not make it clear. I followed some examples and they did not work… or at least do not work as of 4.12… maybe something is different
Hello, I am trying to remove the death sequences from the player. I can’t find where some of the functions are being called. UnFreeze(), StartSpectating(), I need to remove these functions but cant seem to figure out where they are even being called from. I know they are in the player controller but I need to just get rid of all of that, so I can handle the death on my own terms but even when I do the spectating messes with it.