Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Modified



Introduced in

Version:VBS3 2120.1.011, VBS4 20.1.2

Description

Description:

When acting as a host for VBS Blue IG, assigns a CIGI entity ID to a VBS object. This allows a separate CIGI host running in parallel to interact with the VBS object, such as attaching a CIGI view to the object.

Syntax

Syntax:

[objectID, cigiID] call IG_AssignCigiEntityID

Parameters:
  • objectID: Array - The network ID of an object, as returned by ObjToId, to assign a CIGI entity ID to.
  • cigiID: Number- The CIGI entity ID to assign to the object, in CIGI scene context ID 0. The CIGI entity ID must not already be assigned in CIGI scene context ID 0.
Return Value:

Array - Containing the following elements:

  • Boolean- If the function succeeds, set to true, otherwise set to false.
  • String- The error message, in case the function does not succeed.

Alternative Syntax

Syntax:

[objectID, cigiID, sceneContextID] call IG_AssignCigiEntityID

Parameters:
  • objectID: Array- The network ID of an object, as returned by ObjToId, to assign a CIGI entity ID to.
  • cigiID: Number- The CIGI entity ID to assign to the object. The CIGI entity ID must not already be assigned in the specified scene context.
  • sceneContextID: Number- The CIGI scene context ID to assign the entity in.
Return Value:

Array - Containing the following elements:

  • Boolean- If the function succeeds, set to true, otherwise set to false.
  • String- The error message, in case the function does not succeed.

Alternative Syntax 

Syntax:

[objectID, nil] call IG_AssignCigiEntityID

Parameters:
  • objectID: Array- The network ID of an object, as returned by ObjToId, to unassign a CIGI entity ID from. A CIGI entity ID must be previously assigned to the object.
Return Value:

Array - Containing the following elements:

  • Boolean- If the function succeeds, set to true, otherwise set to false.
  • String- The error message, in case the function does not succeed.

Examples 

Examples:
// Assigns CIGI entity ID 123 to the player object, in CIGI scene context ID 0.
[ObjToId player, 123] call IG_AssignCigiEntityID

// Assigns CIGI entity ID 42 to the tank object, in CIGI scene context ID 2.
[ObjToId tank, 42, 2] call IG_AssignCigiEntityID

// Unassigns a CIGI entity ID from the tank object, in all CIGI scene contexts.
[ObjToId tank, nil] call IG_AssignCigiEntityID

Additional Information

See also:ObjToId
Multiplayer:
Problems:

...