function adaptedTextPosition(text)
-- show texts of character Hero 10 pixel below character position
local owner = text:getLink(VTextOwner)
if owner:getId().tableId == eCharacters and owner:getName() == 'hero' and game.CurrentScene:getName() == "insert name of scene here" then
local pos = owner:getPoint(VCharacterPosition)
pos.y = pos.y + -150
pos.x = pos.x + 1
text:setValue(VTextPosition, pos)
return true
end
return false
end
registerHookFunction("setTextPosition", "adaptedTextPosition")
function adaptedTextPosition(text)
-- show texts of character Hero 10 pixel below character position
local owner = text:getLink(VTextOwner)
if owner:getId().tableId == eCharacters and owner:getName() == 'hero' and Conditions["ftp"].ConditionValue then
local pos = owner:getPoint(VCharacterPosition)
pos.y = pos.y + -150
pos.x = pos.x + 1
text:setValue(VTextPosition, pos)
return true
end
return false
end
registerHookFunction("setTextPosition", "adaptedTextPosition")