Issue: Construction Script starts multiple times

Hello, I noticed an issue while making my spline road BP. today I wanted to make a Fence BP to create a fence with it. The problem is that the CS is called four times, I have some weird looking road or fence meshes because it spawned 4 times each spline point and my attempt to make the fence BP failed because of that issue. How can I fix that? And I already made a new BP with just a Print String in it, to be sure that it is called multiple times. and yes it does!

Mesh Issue: https://image.prntscr.com/image/ctHx…MLCnGFHvLw.png
The Script: https://image.prntscr.com/image/aJI0…DsJfUGnb1Q.png
I tried something simpler and had the same issue.

There is a way, how you can prevent the construction script from spamming. Just put a “Branch” node in between the “Construction Script” and the “For Loop”. Connect the “Branch” TRUE node to the for loop and the construction script to the input pin of the branch. Then create a boolean variable called “Generate” and plug it into the condition pin of the “Branch” node. If you’ve done that, go to your boolean variable on the left panel and click the eye icon, so the boolean will be available, when you drag your blueprint into the level. When you have the blueprint inside your level, you can just click on your blueprint and it will display your boolean. Use the “Generate” boolean to fire off your functionality.

https://image.prntscr.com/image/qY9cM8ufRKOmQu6Eve45_g.png

U can also mame custom event in event graph and tick the checkbox “call in editor” or something like that in this events settings. This you just have to click button in actors details when u place it in level.

Have this problem. Construction script repeat six times. No one solution help. I have empty actor who doing printstring in construction script.

This makes it impossible to work with arrays in construction script.

1 Like

Someonecan explain why and how this works, I have exactly the same “problem”.
When I put a actor into the lvl and make a print string at the beginning of the construction script, the string is printed 3 times and compiling. Why is that? I would assume construction script is run ones?
I also have only one of the actors in level. Also, I print out the actor name and if “is server”, but all is the same in all three construction skript runs. So, why on compile construction script is runnung multiple times for the same actor?

1 Like