Action: Restricty(target, min, max)

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

restricty(target, min, max)

First defined in: FKiSS4
The restricty action changes the vertical movement limits of target to the absolute range min to max. If target is outside of that range, it is moved to the closest position within that range. If min is greater than max, any previous bounding set by restricty is cancelled.
The horizontal position of target is not affected.
This action takes precedence over any bounding limits set by the user options for a viewing program.

target

In FKiSS4, target may be an object number or a variable representing an object number.

min

In FKiSS4, min may be number or a variable.

max

In FKiSS4, max may be number or a variable.

Example:

;@ restricty(#5, 5, 105)        ; Restricts vertical movement of object #5 to the range of 5 and 105 pixels.
;@ restricty(VarObj, Low, High) ; Restricts vertical movement of object identified by variable VarObj to the range of Low and High pixels.
;@ restricty(#17, 100, 0)       ; Cancels vertical movement restriction on object #17.