Announcement

Collapse
No announcement yet.

Announcing Section #1 for Survival Game - Third-person Player Setup

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

  • replied
    Originally posted by ZioYuri78 View Post
    In SGameState.cpp you can find a variable called TimeScale in the constructor, tweak it as you want.

    If you want you can set this variable at runtime via console in this way:

    1) Open SGameState.h

    2) Scroll down and after the SetTimeOfDay function declare a new function like this

    Code:
    UFUNCTION(exec)
    void SetTimeScale(float NewTimeScale);
    3) Now open SGameState.cpp and define your function (personally i done it after the SetTimeOfDay definition)

    Code:
    void ASGameState::SetTimeScale(float NewTimeScale)
    {
    	TimeScale = NewTimeScale;
    }
    Hope it help
    Not sure why, but it does not seem to be helping, i even built the solution after i made the changes...

    Leave a comment:


  • replied
    Originally posted by KennethE View Post
    How would i change how fast the time of day cycles? for example if i want the daytime to last longer?
    In SGameState.cpp you can find a variable called TimeScale in the constructor, tweak it as you want.

    If you want you can set this variable at runtime via console in this way:

    1) Open SGameState.h

    2) Scroll down and after the SetTimeOfDay function declare a new function like this

    Code:
    UFUNCTION(exec)
    void SetTimeScale(float NewTimeScale);
    3) Now open SGameState.cpp and define your function (personally i done it after the SetTimeOfDay definition)

    Code:
    void ASGameState::SetTimeScale(float NewTimeScale)
    {
    	TimeScale = NewTimeScale;
    }
    Hope it help

    Leave a comment:


  • replied
    How would i change how fast the time of day cycles? for example if i want the daytime to last longer?

    Leave a comment:


  • replied
    Originally posted by Desoxi View Post
    I really have some problems understanding a few things in this project...
    I cant find anything which explains the use of classes like "Local Player", "Player State", "Spectator Pawn".

    And where do you specify where to spawn the player at the start of a game? There are 6 "PlayerStart" objects but only 2 of them, inheriting from
    your custom "SPlayerStart.h", are used. Even when i start it for 3 players.

    EDIT: K i figured out the playerstart thing.. for those who want to know: it is used in SGameMode

    But here is another question: When is "ChoosePlayerStart(AController* Player) called? I guess it uses the Controller spawned for the new player?
    LocalPlayer is a class that's mostly used for local multiplayer and splitscreen.

    PlayerState is used to store variables that need to be send over the network so other clients can understand the state of another player. (A Pawn can replicate variables, but a pawn is destroyed and recreated on every death, the playerstate class allows us to persist certain variables like death count across the network)

    SpectatorPawn, used during spectating. No mesh, no FX, just a fly camera usually. This can be assigned in the gamemode.

    ChoosePlayerStart is called when a new Pawn is spawned during ServerRestartPlayer(..) You can do a search in the entire solution since UE releases now come with all source, it'll help you understand the framework.

    - Tom

    Leave a comment:


  • replied
    I really have some problems understanding a few things in this project...
    I cant find anything which explains the use of classes like "Local Player", "Player State", "Spectator Pawn".

    And where do you specify where to spawn the player at the start of a game? There are 6 "PlayerStart" objects but only 2 of them, inheriting from
    your custom "SPlayerStart.h", are used. Even when i start it for 3 players.

    EDIT: K i figured out the playerstart thing.. for those who want to know: it is used in SGameMode

    But here is another question: When is "ChoosePlayerStart(AController* Player) called? I guess it uses the Controller spawned for the new player?
    Last edited by Desoxi; 11-08-2015, 01:57 PM.

    Leave a comment:


  • replied

    Leave a comment:


  • replied
    Originally posted by Mordynak View Post
    I was hoping to compile this with 4.9.1 due to limited space on an SSD.

    I'm getting the error
    Code:
    1>M:\Dev\Unreal Projects\Survival Series\EpicSurvivalGameSeries-Section-1\SurvivalGame\Source\SurvivalGame\Public/SCharacter.h(72): error C3668: 'ASCharacter::OnLanded' : method with override specifier 'override' did not override any base class methods
    This is the line it refers to.
    Code:
    void OnLanded(const FHitResult& Hit) override;
    Just in case its not possible to do, what version was this made with originally?

    Thanks a lot for this series, its going to be a great help. Its very much appreciated!
    Refactor 'OnLanded' to just 'Landed' and that will fix the compile error if your trying to compile section 1 on version 4.9.

    Leave a comment:


  • replied
    Originally posted by Desoxi View Post
    Hey, i just started to go through the example code and this may be a stupid question.. but why do you prefix all your classes with "S"?
    I thought "Classes that inherit from SWidget are prefixed by S." ?^^
    At this point i didnt read through the doc to teach myself the meaning of the SWidget class, so maybe im missing something.
    S is my project prefix from "SurvivalGame" much like Unreal Tournament uses UT as their class prefix. SWidget is purely a coincidence.

    Leave a comment:


  • replied
    Hey, i just started to go through the example code and this may be a stupid question.. but why do you prefix all your classes with "S"?
    I thought "Classes that inherit from SWidget are prefixed by S." ?^^
    At this point i didnt read through the doc to teach myself the meaning of the SWidget class, so maybe im missing something.

    Leave a comment:


  • replied
    Ok cool. As soon as my VDSL100 is up and ready, i will start planing this.

    Looking forward to your example game since a Survival Game was my first "project" i did in UE4 (:


    Leave a comment:


  • replied
    Originally posted by Mordynak View Post
    I was hoping to compile this with 4.9.1 due to limited space on an SSD.

    I'm getting the error
    Code:
    1>M:\Dev\Unreal Projects\Survival Series\EpicSurvivalGameSeries-Section-1\SurvivalGame\Source\SurvivalGame\Public/SCharacter.h(72): error C3668: 'ASCharacter::OnLanded' : method with override specifier 'override' did not override any base class methods
    This is the line it refers to.
    Code:
    void OnLanded(const FHitResult& Hit) override;
    Just in case its not possible to do, what version was this made with originally?

    Thanks a lot for this series, its going to be a great help. Its very much appreciated!
    This function was changed during the API updates of 4.7. The source on Github is updated to 4.9, so all you need is the latest from the master branch. (The section specific branches were made with 4.6 I believe)

    Leave a comment:


  • replied
    I was hoping to compile this with 4.9.1 due to limited space on an SSD.

    I'm getting the error
    Code:
    1>M:\Dev\Unreal Projects\Survival Series\EpicSurvivalGameSeries-Section-1\SurvivalGame\Source\SurvivalGame\Public/SCharacter.h(72): error C3668: 'ASCharacter::OnLanded' : method with override specifier 'override' did not override any base class methods
    This is the line it refers to.
    Code:
    void OnLanded(const FHitResult& Hit) override;
    Just in case its not possible to do, what version was this made with originally?

    Thanks a lot for this series, its going to be a great help. Its very much appreciated!

    Leave a comment:


  • replied
    Originally posted by Alexarg View Post
    Im on work and I get the url bloqued by a proxy, but i think he is using this:
    http://www.tomlooman.com/ue4-evolves...e-post-effect/
    What you need is the post processing volume in your new level. Under "Blendables" we assigned our own post-processing material. If you need you can copy/paste the volume from one level to another. If you are creating a new volume in your level, then don't forget to check "Unbound" in its properties to make sure the volume is always active regardless if we are overlapping or not.

    https://docs.unrealengine.com/latest...cts/index.html

    - Tom

    EDIT: The quoting got messed up, but I see you got it working!

    Leave a comment:


  • replied
    thank you very much!!!I found it!

    Leave a comment:


  • replied
    Originally posted by liXiang View Post

    i can't find the "bomb gray edge" realization,how to do this?
    Im on work and I get the url bloqued by a proxy, but i think he is using this:
    http://www.tomlooman.com/ue4-evolves...e-post-effect/

    Leave a comment:

Working...
X