Lua Scripting: Can you move a selection?


Hi :slight_smile:

I’ve started toying with Aseprite scripts (this feature is amazing, I love it ^^), and while I’m really keen to try and script some useful things, I found myself stuckt in a problem.

When I try to move a selection that I previously made, I cannot get it to move where I want :frowning:
As far as I understand by looking at , the command I must use should be something like:

app.command.MoveMask(target, direction, unity, quantity)

target = sprite.selection (a selection that I previously told the script to create)
direction = “up”/“down”/“left”/“right” (one of these)
unity = “pixel”
quantity = 10 (10 pixels for example)

But no matter the values I give the function, the selection always moves just 1 pixel down. Not left nor up nor right, only down ^_^U

Could somebody please guide me a bit on this? Thanks in advance! :smiley:



Well, it seems that I am not the only one stuck at this problem. I think I’m a bit glad that I’m not alone XD

Please, o wise and almighty @Dacap , grant us the knowledge :bowing_man:

P.S: Should I have posted this on the “Scripts section” instead?