GetActTime

Category: Objects / Activity
Since engine version: 4.6.5.0 CP

Description

Returns the time (in frames) that the object is already executing this same action.

Syntax

int GetActTime (object pObj);

Parameter

pObj:
Object. Can be 0 in local calls.

Example

private func Burning()
{
  // Rauch
  Smoke(+23, Random(3) - 24, Random(5) + 8);
  // Noch nicht fertig
  if (GetActTime() < 150) return(1);
  // Fertig
  SetAction("Idle");
  // Erz suchen
  var pOre;
  if (!(pOre = FindContents(ORE1))) return(1);
  // Erz verbrauchen
  RemoveObject(pOre);
  // Metall auswerfen
  Exit(CreateContents(METL), -27, +13, 0, -1);
  // Sound
  Sound("Pshshsh");
}
From the foundry: after 150 frames the metal is complete.
See also: GetAction, GetActionTarget, GetPhase, ObjectSetAction, SetAction, SetPhase
Günther, April 2002