Announcement

Collapse
No announcement yet.

player start: what's the point?

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

    #16
    Epic just ran a Livestream last week with:
    Gamemode -> HandleStartingNewPlayer...
    Who knows it might be just what you want.

    Comment


      #17
      I see. but the thing is that I won't have a menu as this should be an archviz scene.

      I just want it to spawn the VR pawn if my HMD is enabled, or spawn the first person character if HMD is disabled.

      I added a branch node on begin play to set the default pawn accordingly if HMD is enabled, but I coded it inside the game level blueprint, and when I started the game, the default pawn had already spawned, so I guess this code should go somewhere that loads before the game mode. I tried inside the level blueprint with cast to game mode, but no deal too, so I assume this only works if you have a menu before loading this level?
      behance.net/fael097

      Comment


        #18
        Originally posted by ClavosTech View Post
        Epic just ran a Livestream last week with:
        Gamemode -> HandleStartingNewPlayer...
        Who knows it might be just what you want.
        that's quite a long stream, do you know the time code where they talk about this?
        behance.net/fael097

        Comment


          #19
          You can watch it from here...

          But in your case much of the Livestream (after the community intro) is about creating a custom player-start / spawn-point class, so you might find it interesting. Outside of that as regards generally solving your original point, you can just code it all in Gamemode anyway...
          Last edited by EntrpriseCustomr; 05-13-2019, 01:19 AM.

          Comment


            #20
            You can prevent Pawns from spawning at game-start just by blanking the Default-Pawn-Class in Project-Settings -> Maps & Modes and setting it to 'None'... Make sure that the Level itself has no Pawn-BP-Actors too! Then just add logic in Gamemode -> Begin-Play that contains a Branch to detect if a HMD is connected or not, and then spawn and possess the appropriate Pawn after that. No menus are needed. You don't even need a Default-Pawn type or Player-Starts (Notes work fine as well).
            Last edited by EntrpriseCustomr; 05-13-2019, 01:20 AM.

            Comment


              #21
              Originally posted by ClavosTech View Post
              You can prevent Pawns from spawning at game-start just by blanking the Default-Pawn-Class in Project-Settings -> Maps & Modes and setting it to 'None'... Make sure that the Level itself has no Pawn-BP-Actors too! Then just add logic in Gamemode -> Begin-Play that contains a Branch to detect if a HMD is connected or not, and then spawn and possess the appropriate Pawn after that. No menus are needed. You don't even need a Default-Pawn type or Player-Starts (Notes work fine as well).
              yes! but you see, that's my original question regarding the player start actor. if I have to use the spawn node for spawning the character/pawn that I want, then the player start actor isn't of much use, I could just use a dummy or any invisible actor to get the coordinates for spawning the character or even set the spawn transform in a variable inside the blueprint and no actors in game. in fact that's the first thing I did, and it works, but that's what made me wonder about the player start

              since the player start actor always spawns the default pawn, I was wondering if I could make a script to set the default pawn appropriately before the player start runs.

              If my game mode has no default pawn set, and I make a simple script inside the game mode blueprint like this: on begin play, set default pawn to mycharacter, it won't work, won't spawn any characters, so I assume the player start actor runs before the game mode is able to set the default pawn
              Last edited by fael097; 05-13-2019, 11:53 AM.
              behance.net/fael097

              Comment


                #22
                since the player start actor always spawns the default pawn.... if I could make a script to set the default pawn appropriately before the player start runs
                Yes you can!

                The Livestream spends quality time covering this: How to create your own Player-Start or override the default etc. Just watch the YT clip from the timestamp... As you surmised, Player-Start is really just a placeholder. So you can use notes, meshes or any actor to randomly select a location / transform from an array etc.
                Last edited by EntrpriseCustomr; 05-13-2019, 12:10 PM.

                Comment


                  #23
                  Originally posted by ClavosTech View Post

                  Yes you can!

                  The Livestream spends quality time covering this: How to create your own Player-Start or override the default etc. Just watch the YT clip from the timestamp... As you surmised, Player-Start is really just a placeholder. So you can use notes, meshes or any actor to randomly select a location / transform from an array etc.
                  I've seen some of it, jump searched for something that could help me out, but it went through some multiplayer stuff and, quite frankly, things that right now it's out of my reach, since I'm an archviz artist trying to make sense of ue4 to behave like I want on my archviz scenes.

                  however while watching it I saw some node that made me wonder about another node and so I looked for a restart player node and it exists, so I just added it after my set default pawn node and it worked! so it was really helpful after all. also saved this video for future reference, there's a lot of ideas there which can be useful for different situations

                  so case closed, thanks a lot man

                  oh btw, this is what I was using before:
                  https://blueprintue.com/blueprint/c6l_994y/

                  and this is what I'm using now:
                  https://blueprintue.com/blueprint/442ww1wx/

                  both are small codes and do the same, but the difference is that now the player start actor actually serves a purpose of spawning the default player rather than being just a reference for transform coordinates.

                  cheers
                  Last edited by fael097; 05-14-2019, 10:18 AM.
                  behance.net/fael097

                  Comment

                  Working...
                  X