Hi,
Yes you can write custom actions in javascript, but I recommand c#, you'll then be able to copy paste from all the existing actions and the one on the wiki and forum.
set the fromGameObject to "none" then the position will be taken in consideration, else it's ignored. that's your problem I think.
bye,
Jean