Event: Stillin(target1, target2)

Related Events: in, out, stillout
Related Actions: letinside
See also: FKiSS, Events, Actions

stillin(target1, target2)

First defined in: FKiSS2
The stillin event makes a comparison based on the individual bounding rectangles of the two targets. If a bounding rectangle for target1 overlaps a bounding rectangle for target2, regardless of whether or not the rectangles previously overlapped, this event will occur. When the targets are objects or groups, comparison is made using the individual bounding rectangles of the applicable cels, not the single bounding rectangle for the entire object.
This event may be triggered by the user picking up an object and dropping it in such a way that it still overlaps another object or by FKiSS movement.
Use this event to react to collision-detection when pixel-collision detection is not necessary.
Only one stillin event should exist for any target1-target2 pair.

target1

In FKiSS2 to FKiSS3, target1 must be an object number.
In FKiSS4, target1 may be an object number, cel, or group.

target2

In FKiSS2 to FKiSS3, target2 must be an object number.
In FKiSS4, target2 may be an object number, cel, or group.

Example:

; Note: The behavior demonstrated here is a form of snap-to.
;
;@ stillin(#1, #2)       ; When any cel in object #1 still overlaps any cel in object #2...
;@   movebyx(#2, #1, 5)  ; Move object #2 to 5 pixels right of object #1's position.
;@   movebyy(#2, #1, 12) ; and move object #2 to 12 pixels down from object #1's position.