SetHostility

Category: Player
Since engine version: 4.6.5.0 CP (extended in 4.9.1.0 GWE) (extended in 4.9.6.0 CR)

Description

Sets bilateral friendship of two players.

Syntax

bool SetHostility (int iPlr1, int iPlr2, bool fHostile, bool fSilent, bool fNoCalls);

Parameters

iPlr1:
Player whose hostility towards another player you want to change
iPlr2:
Player towards whom you want to change hostility\
fHostile:
If unequal to 0, the relationship is hostile. Else friendly.
fSilent:
If not 0, 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.
fNoCalls:
If not 0, the callbacks RejectHostilityChange and OnHostilityChange are not executed. From CR.

Example

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