GetMass

Category: Objects / Status
Since engine version: 4.6.5.0 CP (extended in 4.9.1.0 GWE)

Description

Returns the mass of an object including the mass of all contained objects. With idDef specified pObj is ignored and the original mass of the object definition is returned. If neither pObj nor idDef are specified, the current mass of the calling object is returned.

Syntax

int GetMass (object pObj, id idDef);

Parameters

pObj:
[opt] Object to be weighed. 0 in local calls or with specified definition.
idDef:
[opt] Object definition of which to determine original weight. 0 with specified object pointer

Example

/* Wird bei klick auf Spezial aufgerufen */
protected func ControlSpecial()
{
	// Magersüchtig?
	if(GetMass() < 50) // Normalmasse des CLNK: 50
		// Magensäure frisst sich nach aussen
		CastPXS("Acid", 150, 30);
return(1);
}		
				
Twiggy
wipfmetz / Sven2, August 2002 / April 2003