hasFlag (thisObject, thisFlag);
Checks to see whether the object thisObject has the object flag thisFlag. Flags are specified when creating object types and cannot subsequently be changed by the game.
TRUE if thisObject has the flag thisFlag set. FALSE if not.
objectType kevin () { flag ALIVE; } objectType hilda () { flags ALIVE, FEMALE; } objectType rock () { } sub failToLift (something) { if (hasFlag (something, ALIVE)) { if (hasFlag (something, FEMALE)) { say (ego, "I don't want to pick her up."); } else { say (ego, "I don't want to pick him up."); } } else { say (ego, "I don't want to pick that up."); } }
SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012