I disconnected everything in my blueprint that wasn’t vital and still I call this LargeOpenRoom function once, it runs once, and my sphere trace runs 6 times.
Earlier I had it on a loop to run the sphere trace twice and it looked like it was running 7 times. The bad new is this is running in my construction script to print strings don’t work
The most messed up thing is that it worked like an hour ago. It worked perfectly, then I copied and pasted a line of code, completely broke the whole flipping blueprint. I disconnected that code, no change. I deleted it, no change.
also all those nodes lines connecting into one could have something to do.
try separating the trace to be called by a custom event. then when you need to check the trace in other parts of the blueprint, you call that custom event.
so you don’t have all those lines merging.
why this can be an issue? ok so I have no deep knowledge about blueprints but from my poor man understanding is that unreal, behind the scene, will split up the blueprint visual logic and compile it. This may introduce unwanted issues.
But if you try to split the logic yourself by using the event nodes (the red input nodes) you help unreal understanding better the blueprint. Because those red node events are how apparently blueprint should work.
where did I’ve got this out? I’ve had similar unexpected issues and found out the hard way that unreal will drop executions on certain nodes under certain conditions. So certain node lines (all nodes after the point where unreal drops the executions will not be called). thing is I didn’t knew about and had this seemingly unexplained behaviors)
fact you said you copy paste could be a clue. may it really failed to compile the blueprint behind scene
That could explain a lot of the strange problems I’ve had that pop up randomly and then disappear equally randomly in the past.
Unfortunately I got rid of EVERYTHING in my Blueprint except the sphere trace and I still get the exact same result seen below. Why the fudge is this happening!?
Before I set the start and finish location to 0, 0, 0 and it looked like it was working. Then I realized that it was just dropping all six traces in the exact same spot
UPDATE: when I put the exact same code on Begin Play, it only runs once. So something is wrong with the construction script causing it to run 6 times in a row
The construction script runs always multiple times when you compile, additionally when you drag it in editor and didn’t toggle the option off to update when dragging it. You see it at multiple different locations because, each time it fires the function, it chooses a new random location based on your math. Checkout the engine content BP_SkySphere (i am at work rn so dunno its exact name) and look in the construction script, there you can see how to trigger the construction script only once (custom logic with booleans).
You can also google why the construction scripts runs multiple times.