When you say Drag, you mean dragging the the BP around or dragging in a Variable.
Check the comment below out.
**JParent **Feb 15 '15 at 9:20 AM
Construction scripts are run within the editor, even when the game is not running (they are also run when the Blueprint is loaded at runtime/in-game). Every you compile a blueprint or move a blueprint in your level,
I have a simple BP that spawns many blocks in the contruction script (to use as floor/wall for example).
Every I move this actor in the level, the construction scripts runs and does its work (as it should).
But once I have the BP setup in the level, I don’t want it to change (for example a “set random color” of the added meshes) when i drag the actor in the level.
I read a few times about a button “Don’t run construction cript on drag”, and I hope this is what I need
I do not know where this option is (and if its there at all), but You can do this yourself easily.
Make boolean variable “execute construction” expose it to editor.
Then very first thing do branch and check if its true.
There should be also some variable that tells if game is run in editor or its real runtime ie .game or editor
Or you could create function library, and add function there that keeps that “execute construction” in there.
And use that function as kind of global variable.
Ps.
I do same trick all the for stuff that i want snapped. Some actors always get to 0,0,0, some always stick to x-y plane. Some always snap to circle etc.
That circle thing is esp nice. I get vector of location to 0,0,0, normalize it then multiply by radius. And actor follows circle only.
Could improve it with variable that is center, and add that vector widget to it. Perfect snapping for planets.
Not perfectly on point but since this is the first result google throws at people when searching for anything related to drag and construction scripts it might be be worth mentioning that there is still a bug where if you are dragging the component of the actor and not the actor the construction script will not run on drag. I ran into this problem just now and just couldn’t find a solution as to why would my construction script ignore dragging.
I would really like it if it would fire if I was dragging the components too tbh… but never would have guessed that I can select the root component separately from the actor - especially since moving the root component moves the actor as far as I’ve seen it.