Announcement

Collapse
No announcement yet.

Ongoing C++ Gameplay Example Series: Making a Survival Game

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

    why other blueprint or c++ class dont compile like blueprint?

    Comment


      when hit more than one spacebar key player flying to the sky
      how fix that ?

      Comment


        Originally posted by davidgutjar View Post
        when hit more than one spacebar key player flying to the sky
        how fix that ?
        4.13.2.

        I don't know if this is the best way, but it works for me at the moment.


        In your SCharacter.cpp (or whatever you named yours)

        void ASCharacter::OnStopJump()
        {
        bPressedJump = false;
        StopJumping();
        }

        Comment


          This project is SUPER INSPIRING and I'm soo excited to try it out!! My question is though, what is the license and could the license please be included in the git? Thank you so much for all of your hard work on this!
          Last edited by TheReaperKing; 11-11-2016, 03:17 PM.

          Comment


            I just got 4.13.2 downloaded and installed, and I opened your project in it, and I get this error.

            Is a file missing? Where can I find it?

            Comment


              Hey thumbs up man! But i really cant seem to know whats causing infinite jumping glitch , tried donwloading the project 2 times (using 4.13 version) , could you please please update it with the fix on GitHub? I would love to <3

              Comment


                Originally posted by Luc4m4rio View Post
                Hey thumbs up man! But i really cant seem to know whats causing infinite jumping glitch , tried donwloading the project 2 times (using 4.13 version) , could you please please update it with the fix on GitHub? I would love to <3
                Just uploaded a fix for this infinite jumping glitch to GitHub.

                Originally posted by LanceJZ View Post
                I just got 4.13.2 downloaded and installed, and I opened your project in it, and I get this error.

                Is a file missing? Where can I find it?
                I get the same error, not quite sure why it's failing to import. Afaik everything still works though.
                Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

                Comment


                  Hey question? is this gonna get updated to 4.14? I tried it myself but I am not that much of a code wizard ^^

                  Comment


                    Running C:/Program Files (x86)/Epic Games/4.14/Engine/Binaries/DotNET/UnrealBuildTool.exe SurvivalGame Development Win64 -project=”C:/Users/Kavan/Documents/Unreal Projects/SurvivalGame 4.14/SurvivalGame.uproject” -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE
                    @progress push 5%
                    Parsing headers for SurvivalGameEditor
                    Running UnrealHeaderTool “C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\SurvivalGame.uproject” “C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Intermediate\Build\Win64\SurvivalGameEditor\Development\SurvivalGameEditor.uhtmanifest” -LogCmds=”loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
                    Reflection code generated for SurvivalGameEditor in 4.9968581 seconds
                    @progress pop
                    Performing 6 actions (4 in parallel)
                    [2/6] Resource ModuleVersionResource.rc.inl
                    [3/6] Resource SurvivalGame.rc
                    PCH.SurvivalGame.h.cpp
                    Module.SurvivalGame.cpp
                    SurvivalGame.generated.cpp
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SBaseCharacter.cpp(101): error C2039: ‘GetMatchState’: is not a member of ‘AGameModeBase’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(10): note: see declaration of ‘AGameModeBase’
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SPlayerController.cpp(31): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\Engine/World.h(780): note: see declaration of ‘UWorld::GameState’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime/Engine/Classes/Animation/AnimInstance.h(24): note: see declaration of ‘UWorld’
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SPlayerState.cpp(41): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\Engine/World.h(780): note: see declaration of ‘UWorld::GameState’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime/Engine/Classes/Animation/AnimInstance.h(24): note: see declaration of ‘UWorld’
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(9): error C2011: ‘FLogCategoryLogGameMode’: ‘struct’ type redefinition
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(20): note: see declaration of ‘FLogCategoryLogGameMode’
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2027: use of undefined type ‘FLogCategoryLogGameMode’
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(20): note: see declaration of ‘FLogCategoryLogGameMode’
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2065: ‘CompileTimeVerbosity’: undeclared identifier
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.IsSuppressed’ must have class/struct/union
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.GetCategoryName’ must have class/struct/union
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2665: ‘FMsg::Logf_Internal’: none of the 2 overloads could convert all the argument types
                    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Core\Public\Logging\LogMacros.h(37): note: could be ‘void FMsg::Logf_Internal(const ANSICHAR *,int32,const FName &,ELogVerbosity::Type,const TCHAR *,T1)’
                    with
                    [
                    T1=FVector *
                    ]
                    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): note: while trying to match the argument list ‘(const char [111], int, ELogVerbosity::Type, const wchar_t [37], const TCHAR *, FVector *)’
                    ERROR: UBT ERROR: Failed to produce item: C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Binaries\Win64\UE4Editor-SurvivalGame.dll
                    Total build time: 47.08 seconds
                    That's what happens on 4.14? Can someone help me get this right? I know C++ but kinda new to the engine. I assume it has got something to do with not using getters to access private members?

                    Comment


                      Hey guys, the project just got upgraded to 4.14 for those who were having issues compiling.
                      Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

                      Comment


                        Thanks Tom, you sir are a hero

                        Comment


                          I am trying to learn an optimal way to update the UMG from my C++ project.

                          I see that this project uses Event Tick in Widget_PlayerInfo to call the functions to update the health bar and energy bar which get the needed numbers from the SCharacter.

                          I followed another example where I bound the Progress Bar to a function that does the same as the function in the Survival demo (get the data from the character). I have read comments that binding is not ideal for performance. (Don't know the difference as of yet).

                          I found this post by [MENTION=155]TheJamsh[/MENTION], https://forums.unrealengine.com/show...0i%20mix%20umg, that I have yet to unravel.

                          Can anyone point me to resources that will help shed more light on this?

                          Not a C++ but at least more helpful. https://docs.unrealengine.com/latest...dUI/index.html

                          Ok, I used the information in the link to only update the UMG when an event fires. Sometime make this harder than it really is.
                          Last edited by acxsasx; 01-13-2017, 12:12 AM.

                          Comment


                            Inside of here https://github.com/tomlooman/EpicSur...SCharacter.cpp

                            I can't figure out where Line #201 is getting "Controller" from.
                            Can anyone point me in the right direction.

                            Comment


                              From the APawn class. SCharacter->SBaseCharacter->ACharacter->APawn. Inheritance, sometimes hard to follow.

                              Comment


                                Originally posted by maxproz View Post
                                Inside of here https://github.com/tomlooman/EpicSur...SCharacter.cpp

                                I can't figure out where Line #201 is getting "Controller" from.
                                Can anyone point me in the right direction.
                                Inherited from APawn
                                https://docs.unrealengine.com/latest...awn/index.html
                                Join the Unreal Engine community on Reddit! | Twitter: @ZioYuri78

                                Comment

                                Working...
                                X