if game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then
return true
else
return false
end
You could do something along the lines of this...Start off by creating an if lua result action part, in which you should query if both horizontal and vertical scrolling is false, if both are false then it should return true; else it should return false.if game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then return true else return false end
After that you should insert the action parts you want to execute, then add an else statement after your action parts, followed by a jump to x action action part, make sure it's set to absolute & that you are jumping back to whatever action part number the if lua result action part is. Finally add an end if action part to close off the if query.Quick note: what we have created here is a self contained loop that will prevent any action parts after the block from being executed until it's allowed to end the if query block.P.S: I have not tested this out, so it may or may not work.
You could do something along the lines of this...Start off by creating an if lua result action part, in which you should query if both horizontal and vertical scrolling is false, if both are false then it should return true; else it should return false.if game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then return true else return false end
After that you should insert the action parts you want to execute, then add an else statement after your action parts, followed by a jump to x action action part, make sure it's set to absolute & that you are jumping back to whatever action part number the if lua result action part is. Finally add an end if action part to close off the if query.Quick note: what we have created here is a self contained loop that will prevent any action parts after the block from being executed until it's allowed to end the if query block.P.S: I have not tested this out, so it may or may not work.
-- 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=2325, y=100})
return true
end
end
function txtPos(text)
if text.Owner:getId().tableId == eCharacters then -- if character text
text:setValue(VTextPosition, {x = game.ScrollPosition.x + (game.WindowResolution.x / 2), y = game.ScrollPosition.y + (game.WindowResolution.y - 85)}) -- define the new text position
return true -- update text position
end
return false -- else don't update text position
end
registerHookFunction("setTextPosition", "txtPos") -- define the hook function for handling text position
no worries. both issues?