Though this doesn’t neccesarily answer your question. You could make a custom event on the object firing into the same code your construction script is. Then fire the custom event after you rotate the object. I have had construction script problems before and always seam to have to make some kind of work around.
Hi I’m writing a blueprint utility widget which rotates objects.
My problem is when I do this it does not trigger the construction script on the object I rotate. any idea how I could get it to?
This is my code:
Thanks in advance.
Ed
Oh in that case you can set up an interface. I cant remember the exact details but I know it’s under blueprints and it’s blueprint interface. Add the event you want with any inputs if need be and to implement it you go into the class defaults of the blueprint that’s either calling it or firing it.
The way I used it was to highlight interactible objects when hit by a line trace being constantly fired from my character. Since I didnt want to have to cast to every different object that would be interactible. It’s really easy no casting so like in the snipit you posted after you set up the interface call the event at the end and pass in the array element as the target if the actor your rotating has the event from the interface it will fire it.
Thanks I though of that, but it’s not a specific object. It just any.
Thanks Valcare, but does not the interface require you to make alterations to the objects? In this case I cannot make any alteration to the actors which i’m rotating, since I do not know what they are going to be.
In that case I would probably need more info on the object. Though if you have access to the construction script of the object your rotating and have or can write code on its graph. The interface would work just like you makeing a custom event.
I cant see ya wanting to fire off a construction script unless there was code to fire so if you dont know what the object is going to be but can write code or have written code for its construction script this should work
i found it
at the end of your editor widget functionality add the “set editor property node”…and use a variable that you use in your actors construction script.
e.g. i have a show_mesh bool…that is usually true
in my editor widget i can set show_mesh with “property value” 0 (drag out of the property value pin and choose convert to bool and set the integer to 0) to make it invisible…
after this i add another “set editor property” node to set the bool to 1 (to make it visible again).
this updates the construction script to recieve your changes that are set via the editor widget.