GetPhysical
Category: Objects
/ Status
Since engine version: 4.6.5.0 CP
Description
Returns physical properties of an object.
Syntax
int GetPhysical
(string szPhysical, int iMode, object pObj, id idDef);
Parameters
- szPhysical:
Name of the physical property requested.
- iMode:
iMode 0 yields the currently used physical properties (those may be permanent or temporary) and can also be used for objects without object info (e.g. vehicles or structures). iMode 1 yields the permanent properties from the object info. iMode 2 yields the temporary properties, in case the object is currently using temporary properties.
- pObj:
The object of which to request properties. Can be 0 in local calls.
- idDef:
If specified, the function will access the original physical value of the specified definition (from DefCore section [Physical]).
Example
if (GetPhysical("Magic", 0, GetCursor())) Message("Ich kann zaubern!", GetCursor());
The selected clonk is happy if he's currently able to accept magical energy.
jwk, Juni 2002
Sven2, Juni 2003