Action: Ifnotmapped(target, alarm ID, delay)

Related Actions: timer, randomtimer, lettimer, iffixed, ifmapped, ifmoved, ifnotfixed, ifnotmoved, exitevent, map, unmap, altmap, letmapped
Related Events: alarm
See also: FKiSS, Events, Actions

ifnotmapped(target, alarm ID, delay)

First defined in: FKiSS2.1
If no cel or no cel in the object or group (FKiSS4) specified by target is currently mapped, the ifnotmapped action sets the timer for an alarm. If a timer for that alarm is already counting down, the new delay time will replace it, resetting the alarm's timer.
In other words, if the cel specified by target is not visible or all cels in the object or group specified by target are not visible, ifnotmapped sets the timer on the alarm.
Setting delay to zero will cancel the timer for that alarm, preventing the alarm from being activated.

target

In FKiSS2.1 to FKiSS3, target must be the name of a cel file.
In FKiSS4, target may also be an object number, group, or a variable representing an object number or group. In this case, if none of the cels are mapped, the entire object or group is considered unmapped.

alarm ID

In FKiSS2.1, alarm ID must be an alarm ID number.
In FKiSS3, alarm ID may be an alarm ID number or a variable representing an alarm ID number.
In FKiSS4, alarm ID may also be a symbolic name representing an alarm or a variable representing an alarm ID number.

delay

In FKiSS2.1, delay must be a number representing the delay time in milliseconds.
In FKiSS3, delay may also be a variable representing the delay time in milliseconds.

Example:

;@ ifnotmapped("doll3.cel", 10, 1000)     ; if doll3.cel is hidden, set alarm 10 to 1000 milliseconds
;@ ifnotmapped(#5, 10, 1000)              ; If any cel in object 5 is hidden, set alarm 1o to 1000 milliseconds
;@ ifnotmapped(!MyGroup, 10, 1000)        ; If any cel in group !MyGroup is hidden, set alarm 10 to 1000 milliseconds
;@ ifnotmapped(VarObj, MyAlarm, VarDelay) ; If any cel in group or object VarObj is hidden, set alarm MyAlarm to VarDelay milliseconds