Hello there,
First time posting a question.
I currently have a blueprint that iterates over an object list and moves them from one preset location to another. Now, setting the locations for all these objects can be quite a hassle for my designers (placing a dozen objects, copying their coordinates and pasting them into a transform array essentially).
Another programmer on our team realized that we could easily turn this into a function, where you position the objects in their start locations, run a function over all the objects, it copies the transforms into an array, and you repeat for the end points.
The trick is, how do we do this from the editor? Otherwise, we’d have to come up with a way in actual runtime gameplay to select objects, instead of just selecting them in the editor and pressing a button.
My colleague realized that in the construction script, it runs when changes are made in the editor, so if we have a bool on a master object, we can have an if statement check that bool, run the function, and then reset the bool.
Note the image above, where you basically can place your logic in the red circle.
This all works pretty well actually, so I decided to expand this functionality. I thought “man, it sure is painful to have to click on the ‘controller’ object every time you want to make a small change. What if I just want to change the position of one object?” So I basically repeated the exact same process, and had it call a function on its parent to find itself in the transform array and update its position.
This time though…it crashes. It even crashes after I remove all of the logic, compile, and try to just set, then reset the boolean.
Now, I know this is not the place to report bugs, but I was curious if there is a “correct” way to do what we are basically hacking in here. Otherwise, I have to just work around the bugs until a fix is made.