Download

GameMode Construction Script not invoke in 4.6

It does not work either in PIE or Standalone Game.

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. :slight_smile:

construction.png
event_graph.png

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.

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. :slight_smile:

03d0846fc82f2fb5aa5a4b0989025a9595696572.png
8866cef9c913703ebe30a01db119094441118293.jpeg

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.

Only Event Begin Play was being executed.

I tried other node functions attached after Construction Script Node. They were all not run.

The Character Contruction Script are OK. GameMode Blueprint Construction Script Never run. I can make sure it is a bug in 4.6.1.

Any replies? I think it is a bug.

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.

I can make sure I added it to world settings.

Only “Construction Script” Node was not called, “Event Begin Play” is always been called.

You can look at the screen above. You would understand what happens.

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?

I understand what you said. But the real problem is that Game Mode Construction Script Node never excutes even in Standalone Game.

https://answers.unrealengine.com/questions/132754/gamemode-construction-script-bug.html