4 - In “Construction Script” I added a “Set Text” Node with value of “Relative Location” of the Cube.
It was working perfectly on both: in Viewport and in the World, but “Construction Script” it stopped working on the World. Now it only works at Viewport of the Blueprint!!
When I change the cube position in the World, the TextRender component is not updated anymore… I don’t know why it stopped working!
I tried to uninstall and install UE 4.24.3 again, but without success …
I recorded a video to demonstrate! I kindly ask you to, if you can, watch to better understand my problem! https://youtu.be/pgaWlPTZmak
Thanks for listening!
Please help me. I accept any help or tip!
Thanks in advance!
I think what is happening here is that you are using the Cube’s relative location, which is relative to the actor itself. So what is happening is that when you move the cube component in the blueprint editor viewport you will see the text value change, but when you move the actor in the world editor viewport
you are moving the whole actor, so the cube component’s location relative to the root component never actually changes. If you select the actor in the world, select the cube component itself from the actor component hierarchy, and move that you will likely see the value change.
I am not 100% sure what the goal with this blueprint is but what you will likely want to do is change the “relative location” node to a “get actor location” node.
Man, actually the problem is happening to my Engine, and I don’t know why. This example I used was just to demonstrate the problem! It is as if the “Construction Script” was not being updated in real time.
In this example that I demonstrated, regardless of whether the location is relative or global, the “TextRender” should be updated in real time in the World, since it updates in the viewport of its own Blueprint!
To clear conscience, I tested again with “Get World Rotation” instead of “Get Relative Location” and the result was the same!
I watched your vid. The script only runs when the actor is moved. You’re not moving the actor, you’re moving a component, so no update… This is correct functionality I’m afraid. :-/
Apparently all of my “Construction Script” is not working in “real time” in the World. It only works in the viewport of your own Blueprint … I tested it on other versions (EU version 4.23.1) and it worked perfectly …
I recorded a video to demonstrate! I kindly ask you to, if you can, watch to better understand my problem!
Construction will only run once, you need to use Tick instead, or have some other trigger.
It updates in the viewport because Construct runs each time properties change.
I understand. Do you have any suggestions on how to make this Tick Trigger in the “Construction Script”? I needed it to work without having to play in the game to see the changes …
Before it was working … but it stopped … I didn’t understand why …
I did it too! But in the Event Graph, the “tick event” only works in real time when I play the game. I need a “tick event” in the “Contruction Script” without me having to play the Game … Do you know how?
Or a trigger that executes my function whenever there are changes …