-- let's create the function which sets the position of displayed textI'm not very good with Lua yet, would it just be something like adding a print command?
function setTextPosHook(text)
-- if text owner is a character then...
if text:getLink(VTextOwner):getId().tableId == eCharacters then
text:setValue(VTextPosition, {x=630, y=625})
return true
end
end
-- let's create the event listener for handling position of displayed text
registerHookFunction("setTextPosition", "setTextPosHook")
newtext = text:getLink(VTextOwner):getTextStr(VCharacterName).. "/n".. text:getTextStr(VTextCurrentText)
text:setValue(VTextCurrentText, newtext)
-- let's create the function which sets the position of displayed text
function setTextPosHook(text)
-- if text owner is a character then...
if text:getLink(VTextOwner):getId().tableId == eCharacters then
text:setValue(VTextPosition, {x=630, y=625})
return true
end
end
-- let's create the event listener for handling position of displayed text
registerHookFunction("setTextPosition", "setTextPosHook")
-- adding character name to dialog
function text( obj )
return obj.Owner.name .. "\n" .. obj.CurrentText
end
registerHookFunction("textText", "text")
-- let's create the function which sets the position of displayed text
function setTextPosHook(text)
-- if text owner is a character then...
if text:getLink(VTextOwner):getId().tableId == eCharacters then
text:setValue(VTextPosition, {x=630, y=625})
txt(game.CurrentCharacter)
return true
end
end
-- let's create the event listener for handling position of displayed text
registerHookFunction("setTextPosition", "setTextPosHook")
-- adding character name to dialog
function txt(obj)
return obj.Owner:getName() .. ": " .. obj.CurrentText
end
registerHookFunction("textText", "txt")