I’m having trouble understanding how to attach a widget of text blocks to a spring arm on my character. At a certain moment I would like a flip book to become visible and the text widget to begin next to it. The text widget has blueprints to make the typewriter effect I saw on a youtube tutorial. The widget works fine when I send it to the viewport. (as seen here)
However, the entire hud is on a spring arm attached to my character in a sidescroller. It lags behind the character slightly so it moves around. The flipbook of the talking cat isnt an issue but I would like the text widget to appear next to it and move around with the springarm also.
I’m unsure how to achieve this. Simply adding the widget component doesnt seem to get me closer. I’m probably missing something.
Also I would need the ability to type in what the widget says like I have currently.
Another sidenote is that the camera is on a springarm and the camera has effects on it. When the widget is added to viewport is doesnt get the effects from the camera view.
The idea is that the cat pops up at a certain moment and tells the player something. The text on the screen is scrolling instead of a static text. I would need a way for the widget to “start from the beginning of its text” with a blank area and fill in the letters. Like a typewritter.
You will need to append string to achieve the type writer effect with a function timer and for the scroll top to bottom, you will need a scrollbar and an event tick/function timer to automatically scroll to end.
@Everynone Sorry. The typewriter effect on the text works fine when I send it to a viewport.
I would instead like to attach it to the same spring arm as the picture of the cat. The cat is on a spring arm. Since the cat is just a flipbook i just change the visibility of the flipbook and that works. However, the text needs to “initialize” or something and still be able to read from the “text input” fields in another blueprint.
@Arodi007 Sorry I’m not doing a good job of explaining this.
Like I said to @ Everynone:
The typewriter effect on the text works fine when I send it to a viewport.
I would instead like to attach it to the same spring arm as the picture of the cat. The cat is on a spring arm. Since the cat is just a flipbook i just change the visibility of the flipbook and that works. However, the text needs to “initialize” or something and still be able to read from the “text input” fields in another blueprint.
Isn’t it a matter of calling a custom event? Or use OnInit, or Construct (already there). Both will fire when you spawn a new widget component and attach it to a springarm.
If you want to control the when nore precisely, use a custom event with a Timer or Delay.
You can push new text into the widget component’s widget like so:
Get widget component → get user widget → cast → set text variable.
@Everynone Thanks for your response. I changed the “on construct” of the widget to a custom event “start talking”. Im now able to put a print string in the widget to understand that it is at least existing. But I’m still unsure how to send the text to it. I’m not able to “get widget component” unless im pulling from the wrong source or something. I added a picture of some of the nodes I have pulled up. They arent all connected except for the ones leading to the “start talking” function. The extra ones are just there for to say i’m way off or maybe on the right track.
@Arodi007 Thanks for your response. Am I able to do this while still retaining the typewriter effect the widget produces? Currently it types out each letter one at a time until it types all the letters.
UPDATE this does indeed call the widget and the typerwitter effect happens and it seems to be attached to the springarm as desired. Thank you
NOTE I didn’t edit the Talking Cat Widget itself. I left that the way it was. Just used the nodes to call it in the correct manner compared to what I had before.