There's really no difference between action and function, actions is just something you place from WED whereas you can't place function. But have you defined x1,y1,z1?
Personally I don't even understand what you're trying to achieve, could you be more specific please?