Announcement

Collapse
No announcement yet.

GameMode Construction Script not invoke in 4.6

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

    GameMode Construction Script not invoke in 4.6

    It does not work either in PIE or Standalone Game.
    My Github: https://github.com/henrya2

    #2
    Hi there,

    Can you attach a screenshot of what you are trying to run from the construction script so we can see what is happening?

    This usually occurs when an object reference that has not yet been created at the time the construction script runs is called, but put up a screenshot and we'll take a look.
    Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

    Comment


      #3
      Click image for larger version

Name:	construction.png
Views:	1
Size:	243.1 KB
ID:	1064519
      Click image for larger version

Name:	event_graph.png
Views:	1
Size:	189.7 KB
ID:	1064520
      My Github: https://github.com/henrya2

      Comment


        #4
        I simply adds Print String after Construction Node, it won't execute either. And I adds break point to Construction Script Node, it never hits.
        My Github: https://github.com/henrya2

        Comment


          #5
          Try moving everything from the construction script to the Event Begin Play and see if it runs properly. Just add a pin to the sequence and plug the PrintString into the 3rd slot

          The GameMode is one of the first objects created at game time, so it is likely there are no Actors of that class created yet. If it runs fine from the Event Begin Play then this is the reason.
          Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

          Comment


            #6
            Click image for larger version

Name:	newcon.png
Views:	1
Size:	251.5 KB
ID:	1064538
            Click image for larger version

Name:	exe.png
Views:	1
Size:	739.9 KB
ID:	1064539

            Pardon me, but I can not agree with you. Construction script actually not executed at all.
            I set break point to it. It never hits.
            My Github: https://github.com/henrya2

            Comment


              #7
              Only Event Begin Play was being executed.
              My Github: https://github.com/henrya2

              Comment


                #8

                My Github: https://github.com/henrya2

                Comment


                  #9
                  I tried other node functions attached after Construction Script Node. They were all not run.
                  My Github: https://github.com/henrya2

                  Comment


                    #10
                    The Character Contruction Script are OK. GameMode Blueprint Construction Script Never run. I can make sure it is a bug in 4.6.1.
                    My Github: https://github.com/henrya2

                    Comment


                      #11
                      Any replies? I think it is a bug.
                      My Github: https://github.com/henrya2

                      Comment


                        #12
                        Hi Henry Read,

                        Have you made sure to add your game mode to your world settings and project settings? It looks like the play in editor does not see your gamemode, make sure that both locations are calling it.
                        Adam Davis | Marketplace Support | Epic Games
                        How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

                        Comment


                          #13
                          I can make sure I added it to world settings.


                          Only "Construction Script" Node was not called, "Event Begin Play" is always been called.
                          My Github: https://github.com/henrya2

                          Comment


                            #14
                            You can look at the screen above. You would understand what happens.
                            My Github: https://github.com/henrya2

                            Comment


                              #15
                              the construction script only fires when an actor is first generated, it will not fire again unless it is re-added or altered. Additionally, if the objects it is looking for are spawning after begin play, it will not run the script. Typically, it is best to use construction script for objects that need code to happen as soon as they are placed or moved in the level or need to be procedurally generated. The gamemode in particular only gets use out of the construction script when you first open the game, so in most cases it is best to use nodes in the event graph or specific actor blueprints construction scripts for various features. What are you specifically trying to do?
                              Adam Davis | Marketplace Support | Epic Games
                              How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

                              Comment

                              Working...
                              X