Action: Letmapped(variable, target)

Related Actions: map, unmap, altmap, ifmapped, ifnotmapped
See also: FKiSS, Events, Actions

letmapped(variable, target)

First defined in: FKiSS3
The letmapped action sets the value of variable to 1 if target is mapped or to 0 if it is unmapped. When target is an object or group, variable is set to the total number individual cels which are mapped.
Mapped cels may be clickable and visible (although ghost() and transparent() can also affect this). Unmapped cels are unclickable and invisible.

variable

Must be a variable name.

target

In FKiSS3, target must be a cel.
In FKiSS4, target may also be an object number, cel, group, or a variable representing an object number.

Example:

;@ letmapped(X, "doll.cel") ; sets X to 1 if doll.cel is mapped.
;@ letmapped(X, #5)         ; Sets X to number of cels in object 5 that are mapped.
;@ letmapped(X, !MyGroup)   ; Sets X to the number of cels in group !MyGroup that are mapped.
;@ letmapped(X, VarObj)     ; Sets X to the number of cels in object or group identified by VarObj that are mapped.