GetPhysical

Category: Objects / Status
Since engine version: 5.1 OC

Description

Returns physical properties of the object or the definition in the calling context

Syntax

int GetPhysical(string physical, int mode);

Parameters

physical:
Name of the physical property requested.
mode:
Change mode:
Constant Value Meaning
PHYS_Current 0 In object context: The properties are queried in the currently active mode (temporary or permanent) of the object. This mode is the only one working also for objects without object info. In definition context: The standard values of the definitions are queried.
PHYS_Permanent 1 The permanent properties stored in the player file are queried. This is only possible for player crew members.
PHYS_Temporary 2 The temporary properties are queried if they exist.

Example

if (GetCursor()->GetPhysical("Magic")) GetCursor()->Message("I can do magic!");
The selected clonk is happy if he's currently able to accept magical energy.
See also: ResetPhysical, SetPhysical, TrainPhysical
jwk, 2002-06
Sven2, 2003-06