Event: Out(target1, target2)

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

out(target1, target2)

First defined in: FKiSS2
The out event makes a comparison based on the individual bounding rectangles of the two targets. If no bounding rectangle for target1 overlaps a bounding rectangle for target2 and rectangles of these targets 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. In other words, when no one cel in the target1 object or group no longer overlaps any cel in the target2 object or group, the out event is triggered.
Use this event to react to collision-detection when pixel-collision detection is not necessary.
This event may be triggered by the user picking up an object and dropping it somewhere else or by FKiSS movement.
Only one out 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:

;@ out(#1, #2)           ; When no cel in object #1 no longer overlaps any cel in object #2...
;@  unmap("hathair.cel") ; Hide the hat
;@  map("hair1.cel")     ; and show the hair.