You could create a global Lua variable to store the scene width inside of & use getSize() function inside of an at begin of scene action to update the variable with the current scenes width & height or you could create a Lua table & manually enter the scene sizes into that - latter being more work but less taxing on system resources (Simon mentioned to me ages ago that getSize is a slow function or something - I forget exactly what he said as it was quite a while back).
scnxy = game.CurrentScene.SceneSprite.SpriteSprite:getSize() -- create a table containing x, y (width & height of current scene)
-- key pressed right right arrow / d
game.CurrentCharacter.CharacterDestination = {x = scnxy.x, y = game.CurrentCharacter.CharacterPosition.y}
alternatively, you could use Lua tables... ("scene1" etc. should be replaced with actual scene names)
scn_data = {}
scn_data["scene1"] = {width = 1920, height = 1080}
scn_data["scene2"] = {width = 1920, height = 1320}
game.CurrentCharacter.CharacterDestination = {x = scn_data[game.CurrentScene:getName()].width, y = game.CurrentCharacter.CharacterPosition.y}
Quick note: not sure if either of these examples are correct. Been a while since I used getSize() & I've written these from memory & based on what I see on scripting/data structure pages of the wiki.