Action: Movebyx(target, relative, X)

Related Actions: move, moveto, movebyy, movetorand, moverandx, moverandy, restrictx, restricty, letinitx, letinity, letobjectx, letobjecty
See also: FKiSS, Events, Actions

movebyx(target, relative, X)

First defined in: FKiSS2
The movebyx action causes target to move to a position X pixels horizontally from the position of object relative. The vertical position of target is not affected. Use negative values for a position left of object relative.
FKiSS movement is restricted to the play field unless restrictx or
restricty is used to alter the limits for an object.

target

In FKiSS2 to FKiSS3, target must be an object number.
In FKiSS4, target may be an object number or a variable representing an object number.

relative

In FKiSS2 to FKiSS3, relative must be an object number.
In FKiSS4, relative may be an object number or a variable representing an object number.

X

In FKiSS1 to FKiSS2.1, X must be a number.
In FKiSS3, X may be number or a variable.

Example:

;@ movebyx(#5, #10, -15)           ; Move object #5 to a position 15 pixels left of object #10.
;@ movebyx(VarClothes, VarDoll, X) ; Move the object identified by variable VarClothes X pixels horizontally from the object identified by variable VarDoll.