RTS/Third person shooter influenced by the game 'Hidden & Dangerous'

Is the texture a placeholder or is it going to be a snowy map?

That was the intention, to be a snowy map:)

However, I’m thinking it could be a pain in the ****. It would force me to have to make snowy versions of any assets I put in there. So I may revert to a non snowy scene.

You could do snow with a material collection parameter, I think I saw a couple of tutorials on how to do it (vertex painting IIRC) and besides, some assets don’t need a snowy version. Basically the only thing you’d need a snow version of is soldier outfit. Weapons don’t need any changes and for the buildings and whatnots, the collection parameter way would handle it.

That sound’s interesting, I’ll check that out and try to find a good tutorial! Thank you!

So one quite strange thing about the character movement component, is that there is currently no built in functionality for prone movement. Which is kind of annoying. Instead of going through the trouble of trying to hack it in the character, I’ve decided to extend the character movement component to cater for prone movement.

The Prone() and UnProne() functions work just like Crouch()/UnCrouch().

The StartTransition() and EndTransition() functions are actually used by the animation notify events. It will set IsTransitioning to true or false, which ultimately stops the player from moving. So for example, when the stand to prone animation is playing, we don’t want them to be able to move until that animation has finished. There’s a notify event at the beginning and end of the animation.

As you can also see, I’ve set it up so the prone movement speed can be edited in the unreal editor, just like the way you can edit walk and crouch speed.


UCLASS()class HDREMAKE_V4_API UExtendedCharacterMovement : public UCharacterMovementComponent
{
    GENERATED_BODY()
private:


    bool IsTransitioning = false;
    bool IsProne = false;
    virtual float GetMaxSpeed() const override;


public:


    UPROPERTY(Category = "Character Movement: Walking", EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", UIMin = "0"))
    float MaxProneSpeed;
    
    UFUNCTION(BlueprintCallable, category = "Custom movement")
    void Prone();


    UFUNCTION(BlueprintCallable, category = "Custom movement")
    void UnProne();


    UFUNCTION(BlueprintCallable, category = "Custom movement")
    void StartTransition();


    UFUNCTION(BlueprintCallable, category = "Custom movement")
    void EndTransition();
};


// Fill out your copyright notice in the Description page of Project Settings.

#include "HDRemake_V4.h"
#include "ExtendedCharacterMovement.h"




float UExtendedCharacterMovement::GetMaxSpeed() const
{
    switch (MovementMode)
    {
    case MOVE_Walking:
    case MOVE_NavWalking:
        if (IsTransitioning)
        {
            //If the character is in a transition, we don't want them to move. Return a 0.0 speed.
            return 0.0f;
        }
        else if (IsProne)
        {
            return MaxProneSpeed;
        }
        else if (IsCrouching())
        {
            return MaxWalkSpeedCrouched;
        }
        else
        {
            return MaxWalkSpeed;
        }
    case MOVE_Falling:
        return MaxWalkSpeed;
    case MOVE_Swimming:
        return MaxSwimSpeed;
    case MOVE_Flying:
        return MaxFlySpeed;
    case MOVE_Custom:
        return MaxCustomMovementSpeed;
    case MOVE_None:
    default:
        return 0.f;
    }
}




void UExtendedCharacterMovement::Prone()
{
    //TODO: Create a new function that can correctly set the capsule size for both crouch and prone


    //Call the Crouch function to adjust the collision capsule
    Crouch(true);


    IsProne = true;
}


void UExtendedCharacterMovement::UnProne()
{
    //TODO: Create a new function that can correctly set the capsule size for both crouch and prone


    //Call the UnCrouch function to adjust the collision capsule
    UnCrouch(true);


    IsProne = false;
}


void UExtendedCharacterMovement::StartTransition()
{
    IsTransitioning = true;
}


void UExtendedCharacterMovement::EndTransition()
{
    IsTransitioning = false;
}




In case you guys want some more info or want to download a copy of the extended movement class (I’ve changed the code quite a bit. I’ve uploaded to github), I’ve got a new thread over at: UCharacterMovementComponent Extension for prone movement and animation pauses - C++ Gameplay Programming - Unreal Engine Forums

To future proof the project, I’ve started taking in to consideration, the fact that there is a need for soldier and weapon selection screens.

The order of events will be as follows:

Player will be shown the intro video and description of the mission, objectives etc.
The actual level will be loaded, but a state system is in place. All actors such as the players and enemies will start in a setup state.
Using a state change interface, somebody, such as the setup HUD can call the state change interface to start play.
Using the interface, actors will do what they need to do. Spawn or start running behavior trees etc.
The interface then has an end play call. So there can be an intermission before leaving the level. Actors will stop running behavior trees etc.

I think in the long run, this is going to be a much better solution, and the ‘proper’ solution, opposed to having a level to show the movie, a level to show the setup screens, another one to show intermissions etc. I would end up with a massive amount of ‘levels’, which just isn’t scalable at all!

Hey there, I saw your video here and I am really looking forward to see how you was able to do this. Is it possible that you can send me an example of your source code or something like that? It would be pretty helpful as I need to finish something on the game that I am creating and my brain doesn’t work anymore so that I can create it by myself. Thank you!