SetActionTargets

Category: Objects / Activity
Since engine version: 4.9.1.0 GWE

Description

Sets the activity targets of an object. The result depends on the procedure of the current action.

Syntax

bool SetActionTargets (object pTarget1, object pTarget2, object pObj);

Parameters

pTarget1:
First target object
pTarget2:
[opt] Second target object
pObj:
[opt] Object the target objects of which you want to change. Can be 0 in local calls.

Example

protected func Entrance(pIntoObj)
  {
  return(SetActionTargets(pIntoObj));
  }
Script for a shield spell using an ATTACH action: when the carrying clonk enters a building, the spell will attach itself to the building. This script will not, however, reattach the spell to the clonk when he leaves the building.
See also: GetAction, GetActionTarget, GetProcedure
Sven2, Juni 2003