As far as I'm aware, you can do this only with a script.
This is what I use. Maybe I overcomplicated it, because I did other things as well and changed it to what you want.
-- if anyone knows a simpler solution, please post it! --
This script needs to go in the scripting section, set as definition script.
(go to the scripting section, add a new entry, name it like you want and copy&past the script there. By default the checkmark for "definition script" is set, keep it that way - see image)
This is the script:
--** function to position the action text **--
local txt = ""
local pos = {x=0, y=0}
local new_pos
local buffer = 10
function actiontext(mousePos,text)
if text ~= "" then -- if there is action text
txt = text
-- adjust text position
pos.y = mousePos.y + 50
pos.x = mousePos.x + 25
graphics.addDrawFunc("draw()", 1)
return ""
else
txt = ""
end
return text
end
registerHookFunction("getActionText", "actiontext")
function draw()
if game.Dialog.empty then
if Conditions.Char_is_speaking.Value == false then -- to hide the text while speaking // is changed in the text started event
if game.HideCursor == false then
local dim = graphics.fontDimension(txt)
local halfdim = math.floor(dim.x/2) -- used to center text
new_pos = {x = 0, y = 0}
-- adjust position for text when near the edge
if pos.x + halfdim + buffer > game.WindowResolution.x then
new_pos.x = game.WindowResolution.x - dim.x - buffer
elseif pos.x - halfdim <= buffer then
new_pos.x = buffer
else
new_pos.x = pos.x - halfdim -- center text on x axis
end
-- position on y axis
new_pos.y = pos.y
else
txt = ""
end
-- draw the text --
if txt ~= "" then graphics.drawFont(txt, new_pos.x , new_pos.y, 1) end
end
end
end
-- functions to change the Condition "Char_is_speaking" on text start and text stop
function onTextstart(text)
if text.Owner.tableId == eCharacters and not text.Background then
Conditions.Char_is_speaking.Value = true
end
end
function onTextstop()
Conditions.Char_is_speaking.Value = false
end
registerEventHandler("textStarted","onTextstart")
registerEventHandler("textStopped","onTextstop")
In the script I use a condition that will be changed by the script whenever a character is speaking, but it needs to exist in the game. So somewhere in the game, create a condition and name it: Char_is_speaking, (exactly like this with the capital C, because Lua is case sensitive), set it to false. I created the condition in the conditions tab of my main character, but it doesn't matter where you put it.
In the script are a few lines where you need to adjust things. I marked them in the image with two orange lines.
The first one is the "buffer". This is a variable I use to avoid having the text touching the edge of the screen. The text will stop moving when it is the amount of pixels you set here from the edge. I set it to 10, you can adjust that to your liking.
The other two lines are the ones where the text position is set relative to the cursor position.
When you set the animation center of your cursor image, this is the position of the cursor in the game. In the script you need to set the position for the text on the y-axis below your cursor (in my case this was 50) and on the x-axis centered of your image. (in my case 25)
Adjust that to your cursor image.
let me know if it worked ok for you.
If you are using Discord - it's much more lively in the Visionaire Discord than here. So just pop in!