Center subtitles/dialogue in bottom middle of screen

Hi, so there’s dialogue in my game, and I have a issue where I would need to change the X and Y position of the dialogue text object every time a new dialogue displays, this is because each dialogue is of different length, so I wanted to know if there’s a way to center every dialogue exactly in the bottom and middle of the screen
Here’s an example of the issue I’m running with, this first image is fine, placed nicely in the center and slightly bottom of the screen


But then there’s this, slightly upped the dialogue and now the position needs to be changed, it went more down and more towards the right than it is supposed to

Is there a way around this?

Change Text position set to CameraCenterX()-(Text.Width()/2)

to clarify, change the text position after you update the text content. And if “Whidth” doesn’t work, try “Width”, :stuck_out_tongue:

1 Like

You can’t win with dyslexia
Thx i edited my post

Example event? Trying to do it but it keeps going in places

And what happens when you remove trigger once?

The text keeps moving when the player moves

Moving where?
It is centering it on center of screen on X axis so it kinda can’t move

It moves right when I move right, left when I move left, I’m using the Smooth Camera behavior for the player
Oh btw is there something for the Y axis too where it stays slightly above the bottom of the screen?

So copy smooth camera action for layer on which text is

For Y axis
Change Y position of text set to CameraBorderBottom()-(Text.Height()*3)

Can you elaborate on the first point? I don’t understand it

You have action to smooth camera on player ON SOME LAYER
Duplicate that action and only change in duplicate layer to layer on which text is

I don’t have an action for that, I only have the behavior attached to the player, any action for smooth camera is just enabling/disabling it, player is on base layer

So check if it fix anything if you put text on same layer as player is

Alright, I put it in the same layer as the player which is the base layer, and it seems to work now, it doesn’t move and when I change the text it’s still centered, thanks a lot!

1 Like

This is workaround not a fix
Do not consider it solved but go with if you can’t find fix for it
Truth is i never used smooth camera idk how it works i was sure it is just action like everything else
If not make new topic and ask how to copy smooth camera on other layer

YET i do know there is extension literally called copy camera settings
Guess what it does

I mean I used to literally manually setup the X and Y position for the text object every single time the text got changed so this is leagues better, lol
I’m trying it rn with dialogue of various word count and so far haven’t ran into anything, if I do I might go back here or make a new thread, either way thanks for the help

1 Like