SetActionData

Category: Objects / Activity
Since engine version: 4.6.5.0 CP

Description

Sets the extra data for the current action. The application of the extra data depends on the procedure of the current action. See ActMap procedures.

Syntax

bool SetActionData (int iData, object pObj);

Parameters

iData:
Additional parameter for the activity.
pObj:
[opt] Object for which you want to change activity data. Can be 0 in local calls.

Examples

protected func ControlSpecial2()
  {
  SetAction("Bridge");
  SetActionData(Material("Gold"));
  SetComDir(COMD_Up());
  }
Script for a special clonk: with key Special 2 he will build a vertical gold bridge.
SetActionData(256*3 + 2, FindObject(WWNG))
Adjusts the attaching vertex of the windmill wheel so that the wheel's third vertex will attach to the second vertex of the windmill scaffolding.
See also: GetAction, GetActionTarget, ObjectSetAction, SetAction, SetBridgeActionData, SetComDir, SetDir, SetPhase
Sven2, Juni 2003