Difference between revisions of "Manual:DIL Manual/isaff()"
Jump to navigation
Jump to search
(XML import) |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | = integer isaff ( u : unitptr , i : integer ) = | ||
| + | u : A unit to be examined. | ||
| + | i : An id of an affect, see ID_* in values.h and/or vme.h | ||
| + | result: TRUE, if unit 'u' is affected by affect id 'i' | ||
| − | + | '''Examples:''' | |
| − | + | ||
| − | + | if (isaff(self, ID_BLIND_CHAR)) | |
| − | + | sendtext("You're blinded", self); | |
| − | + | ||
| + | This command scans the unit 'u' for any affect matching the id 'i' | ||
| + | and returns TRUE if one is found. | ||
| + | |||
| + | See also: | ||
| + | > [[Manual:DIL_Manual/subaff()|subaff()]] | ||
| + | > [[Manual:DIL_Manual/addaff()|addaff()]] | ||
| + | > [[Manual:DIL_Manual/getaffects()|getaffects()]] | ||
Latest revision as of 22:14, 6 March 2022
integer isaff ( u : unitptr , i : integer )
u : A unit to be examined. i : An id of an affect, see ID_* in values.h and/or vme.h result: TRUE, if unit 'u' is affected by affect id 'i'
Examples:
if (isaff(self, ID_BLIND_CHAR))
sendtext("You're blinded", self);
This command scans the unit 'u' for any affect matching the id 'i' and returns TRUE if one is found.
See also:
> subaff() > addaff() > getaffects()