local Player = getObject("Characters[PLAYER_NAME]")
local ProjectResolutionX = 1920
local DefaultSize = 100
local ShrinkFactor = 0.67
function ScalePlayerOnX()
Player.ScaleFactor = DefaultSize-(Player.Position.x/ProjectResolutionX*DefaultSize)*ShrinkFactor
end
registerEventHandler("mainLoop", "ScalePlayerOnX")
I've tried the solution with the action areas and it works just fine.With Lua script you could do that, but maybe Simon could implement an option into the engine that you can tick in the change way system action part to retain current destination/destination object/destination actions. I'll ask him about it later on on our Discord server; which you are free to join by the way. Link can be found inside of the news article at the top of the forum board or via the pinned tweet of the official twitter account.But the character stops when the way system is changed.Is there a way that he keeps the position he should go to in memory ?
With Lua script you could do that, but maybe Simon could implement an option into the engine that you can tick in the change way system action part to retain current destination/destination object/destination actions.
dest =
{
game.CurrentCharacter.Destination,
game.CurrentCharacter.DestinationObject,
game.DestinationCommand,
game.DestinationEvent,
game.DestinationItem,
game.DestinationItemPicked
}
if dest[1] ~= nil then game.CurrentCharacter.Destination = dest[1] end
if dest[2] ~= nil then game.CurrentCharacter.DestinationObject = dest[2] end
if dest[3] ~= nil then game.DestinationCommand = dest[3] end
if dest[4] ~= nil then game.DestinationEvent = dest[4] end
if dest[5] ~= nil then game.DestinationItem = dest[5]; game.DestinationItemPicked = dest[6] end