Aw bool set

From ActiveWiki
Revision as of 16:12, 31 October 2008 by Macavity (talk | contribs) (Added in)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 2.1
SDKbuild 13


int aw_bool_set (AW_ATTRIBUTE a, int value)

Description

Sets the value of a boolean attribute.

Callback

None (returns immediately)

Notes

This method functions just like aw_int_set when an integer attribute is passed to it (e.g. aw_bool_set (AW_OBJECT_YAW, 1800)).

See SDK Attributes for more information.

Arguments

a
Attribute (defined in Aw.h).
value
Set to 1 (or nonzero) to indicate True, 0 to indicate False.

Argument attributes

None

Return values

RC_SUCCESS
RC_NOT_INITIALIZED
RC_NO_INSTANCE
RC_READ_ONLY
RC_INVALID_ATTRIBUTE
Outside the range of defined attributes (i.e. 0 to AW_MAX_ATTRIBUTE - 1).
RC_TYPE_MISMATCH
Not an integer or boolean attribute.

Returned attributes

None

Usage

int rc;

/* disable flying in the current world */
aw_bool_set (AW_WORLD_ALLOW_FLYING, 0);

rc = aw_world_attributes_change ();
if (rc != RC_SUCCESS)
  printf ("Unable to change world attributes (reason %d)\n", rc);

See also