SetHostility

Category: Player
Since engine version: 1.0 OC

Description

Sets bilateral friendship of two players.

Syntax

bool SetHostility(int player1, int player2, bool hostile, bool silent, bool no_calls);

Parameters

player1:
Player whose hostility towards another player you want to change.
player2:
Player towards whom you want to change hostility.
hostile:
If true, the relationship is hostile. Otherwise friendly.
silent:
If not false, the hostility messages in the message board will be suppressed. Hostility messages are never displayed during the first frame of a round, regardless of the value of this parameter.
no_calls:
If not false, the callbacks RejectHostilityChange and OnHostilityChange are not executed.

Example

SetHostility(0,1,true,true); SetHostility(1,0,true,true);
Makes the first two players enemies without causing a message.
See also: Hostile
Sven2, 2007-04