Announcement

Collapse
No announcement yet.

Announcing Section #2 for Survival Game - Weapons & Interaction

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by VeyDlin View Post
    I also can not get ".generated.h" in STypes.h
    Hi. I have the same problem. Did you solve it? Thanks

    Regards, TerrariumPopcorn
    Last edited by Eowo223; 10-15-2019, 03:23 AM.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Originally posted by Tom Looman View Post
    What's the problem? the generated.h files don't need any manual work, the Unreal Header Tool automatically creates these files for you each compile.
    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

    I tried to follow this https://answers.unrealengine.com/que...d-structs.html which I thought seemed right and it did not work.

    Leave a comment:


  • replied
    Originally posted by joshcamas View Post
    In one of the screenshots, I saw there was some nice blood effect going on. How was this done, exactly? Could you share the textures/particles?
    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.

    Leave a comment:


  • replied
    In one of the screenshots, I saw there was some nice blood effect going on. How was this done, exactly? Could you share the textures/particles?

    Leave a comment:


  • replied
    Originally posted by VeyDlin View Post
    I also can not get ".generated.h" in STypes.h
    What's the problem? the generated.h files don't need any manual work, the Unreal Header Tool automatically creates these files for you each compile.

    Leave a comment:


  • replied
    I also can not get ".generated.h" in STypes.h

    Leave a comment:


  • replied
    Originally posted by liXiang View Post
    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..
    You can rotate the socket after adding it to your skeleton inside the viewer where you added the Socket.

    Leave a comment:


  • replied
    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..

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    I know that Tom,
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Hi thanks for your answer.

    I have another question.

    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?
    Code:
    bool ASWeaponInstant::ShouldDealDamage (AActor* TestActor) const
    {
    if(TestActor)
    {
     if(GetNetMode() != NM_Client ||
    TestActor ->Role == ROLE_Authority ||
    TestActor->bTearOff)
    {
    return true;
    }
    }
    return false;
    }

    Leave a comment:


  • replied
    Worth adding that you can also do MyPtr.IsValid() on a Weak Object Pointer to check if it is NULL as well (not nullptr, but NULL!)

    Leave a comment:


  • replied
    Originally posted by Vahid View Post

    and another question is what is difference between these two type of pointer ? both compile fine in STypes.h

    Code:
    TWeakObjectPtr<class ASCharacter> PawnInstigator;
    class ASCharacter* PawnInstigator;
    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.

    Hope that helps.

    Leave a comment:

Working...
X