Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:

Defines how friendly side1 is with side2.

Intended to be used on mission start. Changing values during the mission can cause unexpected errors in AI behavior.

Syntax

Syntax:side1 setFriend [side2 , friendliness]
Parameters:
  • side1: Side-2 - First side.
  • side2: Side-2 - Second side (can be the same as side1, in which case, units of the same side open fire on each other).
  • friendliness: Number - If smaller than 0.6, then side1 considers side2 as an enemy (and attacks it),. Otherwise, it is considered friendly.
Return Value:Nothing

Examples

Examples:
west setFriend [resistance, 0]; 
// WEST attacks independents 
// INDEPENDENT does not attack WEST, unless the following command is executed:
resistance setFriend [west, 0]; 
// INDEPENDENT attacks WEST

Additional Information

See also: getFriend, createCenter, createGroup
Multiplayer:
Problems:

Notes