x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why is this construction script executing twice?

Alright, what I'm trying to do is use a blueprint construction script to spawn a number of other blueprints as child actors. Specifically, I'm making a simple breakout/arkanoid clone for practice. I have a Brick blueprint that contains some basic logic to spawn an effect and destroy itself when hit, and a BrickField blueprint that spawns a number of Bricks as child actors according to settable variables in ordered rows and columns.

Now, the problem is: if I spawn these child actors in the construction script, they seem to be spawned twice, as can be seen in the Scene Outliner window and by the fact that there are flickering colors. If I move the exact same network of nodes from the construction script to an Event Begin Play node in the regular EventGraph, they only spawn once.

Here's the script: alt text (Full size)

As I said, if I take that exact network, copy it, and attach it to an Event Begin Play node, it works as intended.

Here are the assets and blueprints in question: http://stuff.pyrron.com/BrickField-Bug.rar

Does anyone know what's wrong with that? Is it an engine/editor bug, or is it a problem with my blueprint? Any help would be appreciated.

Edited to add: The spawn actor from class node in the Brick blueprint just spawns a particle effect, just delete it or assign a random one if you're getting compile errors.

Product Version: Not Selected
Tags:
more ▼

asked Mar 26 '14 at 02:52 AM in Blueprint Scripting

avatar image

Kashaar
212 5 9 18

avatar image hyawatha15 Mar 27 '14 at 08:32 PM

Not sure if it is just me, but I can't get the attached image to be any larger, making it impossible see the nodes. I probably can't help with your problem, but just pointing that out.

avatar image Kashaar Mar 27 '14 at 08:45 PM

It's a full size image, it's just scaled down by this website. I've added a link to it as well for ease of use.

avatar image drUniversalis Jun 25 '18 at 09:10 PM

This should be a comment, not an answer.

avatar image hyawatha15 Jun 25 '18 at 09:12 PM

This is from over 4 years ago, but yes, you're right. I'm not even sure if comments were an option back then.

avatar image DotCam Jun 25 '18 at 10:23 PM

Your wish is my command =)

avatar image drUniversalis Jun 25 '18 at 09:16 PM

I remember similar behaviour with adding child actors in construction script leading to me going all EventGraph + SpawnActor because after I got the construction script finally running and PIE bug free I hit a wall in the cooked multiplayer test.

Is this Singleplayer or could it be a replication issue?

Also your math is way to complex and hard to read. Seems to me at least half of these nodes are unnessessary (just go actor location + (index * ). If you did not mention it working in EventBeginPlay I wouldve assumed its the messy math.

EDIT: wow answerhub tricked me into digging out an 2014 question again, my bad :D

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I had a similar problem in my Game Mode blueprint. It was executing the Construction Script twice and the Begin Play event three times, even if the only thing I had hooked up to them was a Print String. What fixed it for me was finding that there were actually 3 different Game Mode blueprints in my Content folder, even though it showed that there was only one in the Content Browser. I think what happened was Unreal Engine was creating hidden copies of the blueprint whenever I would copy and rename the blueprint from within the Content Browser. I just deleted the extraneous blueprints and it started running just once again. Hope that helps.

more ▼

answered May 16 '14 at 05:37 PM

avatar image

crackboom
21 1 3 5

avatar image idbrii Jan 16 '17 at 06:05 PM

Those additional uassets are Redirectors.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question