Side Relations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 136963 by R3vo (talk) Unnecessary edit breaking self contained page)
Tag: Undo
(Teeny tiny page refresh, Add categories, etc.)
Line 1: Line 1:
==Sides==
{{SideTOC}}
{{Feature arma3 | This page deals with '''{{arma3}}''' sides, which has more than previous games. See the [[Side]] page to see previous titles' available sides. Also:
* [[west]] {{=}} [[blufor]]
* [[east]] {{=}} [[opfor]]
* [[resistance]] {{=}} [[independent]]}}
== Sides relations ==


The game consists of 8 [[Side]]s:
=== Sides friendship ===
* West
* East
* Civilian
* Resistance
* sideLogic
* Friendly
* Enemy
* Unknown
 
You can determine which [[Side]] a unit is on by using the [[side]] command.
 
{{Important|NOTE: Make sure to recognize the difference between the [[Side]] data type (''setter'') and the textual [[side]] display (''getter'').}}
 
==Factions==
 
Factions are a subset of a given [[Side]]. Examples are "USMC", "RU" or "GUE".
 
A US vehicle driven by a Russian will change from West [[Side]] to the East [[Side]], but still remains part of the USMC faction.
 
Use the [[faction]] command on objects or units to determine it.
 
==Change relations==
 
1) You can set which sides Resistance is friendly to in the mission editor (click on the Intel box).
 
2) Everyone is friendly toward Civilians. This means an armed Civilian will be able to slaughter unfriendly AI troops with impunity.
 
3) You can use the [[setFriend]] command at the initialization of a mission to set relations. It is even possible to make OPFOR and BLUFOR troops friendly and greet one another.
 
<code>EAST setFriend [WEST, 1];
WEST setFriend [EAST, 1];</code>
 
==Sides Friendship==
 
The '''default''' way how engine determines friendliness. If [[setFriend]] command is used, the relationship tables could be different.
 
===IsFriendly===


Helper function: [[BIS_fnc_sideIsFriendly]]
Helper function: [[BIS_fnc_sideIsFriendly]]


{| class="wikitable" cellpadding="10"
{| class="wikitable" style="text-align: center"
|- style="vertical-align:middle;"
! is friendly to
| style="height:40px; width:120px; text-align:center;" |'''Is Friendly To'''
! [[east]]
| style="height:40px; width:120px; text-align:center;" |[[east]]
! [[west]]
| style="height:40px; width:120px; text-align:center;" |[[west]]
! [[resistance]]
| style="height:40px; width:120px; text-align:center;" |[[independent]]
! [[civilian]]
| style="height:40px; width:120px; text-align:center;" |[[civilian]]
! [[sideUnknown]]
| style="height:40px; width:120px; text-align:center;" |[[sideUnknown]]
! [[sideEnemy]]
| style="height:40px; width:120px; text-align:center;" |[[sideEnemy]]
! [[sideFriendly]]
| style="height:40px; width:120px; text-align:center;" |[[sideFriendly]]
! [[sideLogic]]
| style="height:40px; width:120px; text-align:center;" |[[sideLogic]]
|-
|- style="vertical-align:middle;"
| [[east]]
| style="height:40px; width:120px; text-align:center;" |[[east]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[west]]
| style="height:40px; width:120px; text-align:center;" |[[west]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[resistance]]
| style="height:40px; width:120px; text-align:center;" |[[independent]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[civilian]]
| style="height:40px; width:120px; text-align:center;" |[[civilian]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideUnknown]]
| style="height:40px; width:120px; text-align:center;" |[[sideUnknown]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideEnemy]]
| style="height:40px; width:120px; text-align:center;" |[[sideEnemy]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideFriendly]]
| style="height:40px; width:120px; text-align:center;" |[[sideFriendly]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideLogic]]
| style="height:40px; width:120px; text-align:center;" |[[sideLogic]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|}
|}


===IsEnemy===
=== Sides enmity ===


Helper function: [[BIS_fnc_sideIsEnemy]]
Helper function: [[BIS_fnc_sideIsEnemy]]


{| class="wikitable" cellpadding="10"
{| class="wikitable" style="text-align: center"
|- style="vertical-align:middle;"
! is enemy to
| style="height:40px; width:120px; text-align:center;" |'''Is Enemy To'''
! [[east]]
| style="height:40px; width:120px; text-align:center;" |[[east]]
! [[west]]
| style="height:40px; width:120px; text-align:center;" |[[west]]
! [[resistance]]
| style="height:40px; width:120px; text-align:center;" |[[independent]]
! [[civilian]]
| style="height:40px; width:120px; text-align:center;" |[[civilian]]
! [[sideUnknown]]
| style="height:40px; width:120px; text-align:center;" |[[sideUnknown]]
! [[sideEnemy]]
| style="height:40px; width:120px; text-align:center;" |[[sideEnemy]]
! [[sideFriendly]]
| style="height:40px; width:120px; text-align:center;" |[[sideFriendly]]
! [[sideLogic]]
| style="height:40px; width:120px; text-align:center;" |[[sideLogic]]
|-
|- style="vertical-align:middle;"
| [[east]]
| style="height:40px; width:120px; text-align:center;" |[[east]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[west]]
| style="height:40px; width:120px; text-align:center;" |[[west]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[resistance]]
| style="height:40px; width:120px; text-align:center;" |[[independent]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[civilian]]
| style="height:40px; width:120px; text-align:center;" |[[civilian]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideUnknown]]
| style="height:40px; width:120px; text-align:center;" |[[sideUnknown]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideEnemy]]
| style="height:40px; width:120px; text-align:center;" |[[sideEnemy]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideFriendly]]
| style="height:40px; width:120px; text-align:center;" |[[sideFriendly]]
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|-
|- style="vertical-align:middle;"
| [[sideLogic]]
| style="height:40px; width:120px; text-align:center;" |[[sideLogic]]
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task/}}
| style="height:40px; width:120px; text-align:center; color:green" | '''YES'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
| {{task}}
| style="height:40px; width:120px; text-align:center; color:red;" | '''NO'''
|}
|}


==Arming Civilians==


You can arm Civilians by inserting code like the following in their initialization field:
== Change relations ==


<code>this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911"; </code>
* You can set which sides [[resistance]] is friendly/enemy to in the mission editor (click on the Intel box).
* Everyone is friendly toward [[civilian]]s. Civilians AI have a total impunity and can kill any enemy without retaliation (same as [[captive]] units).
* You can use the [[setFriend]] command to set relations between any sides (even [[east]] and [[west]]).


{{Important|NOTE: By default no side will shoot units on the civilian side, even when fired upon by them (same as for [[captive]]s).}}
{{cc|will make east friendly to west and vice versa}}
[[east]] [[setFriend]] <nowiki>[</nowiki>[[west]], 1];
[[west]] [[setFriend]] <nowiki>[</nowiki>[[east]], 1];


==One way hostility==
=== One way hostility ===


1) Using the [[setCaptive]] command allows you to stop enemy units to fire on the target unit.
Using the [[setCaptive]] command allows you to stop enemy units to fire on the target unit.
<code>soldier1 setCaptive true; // soldier1 unit can shoot at enemy, but enemy will not return fire</code>
_soldier [[setCaptive]] [[true]]; {{cc|_soldier can shoot at enemy but enemy will not return fire}}


You can re-activate hostility by canceling captive status.
You can re-activate hostility by canceling captive status.
<code>soldier1 setCaptive false; // soldier1 will be shoot at again by enemy units</code>
_soldier [[setCaptive]] [[false]]; {{cc|_soldier will be shot at again by enemy units}}
 
2) Armed civilians will automatically shoot at anybody who is not friendly to Resistance. Or alternatively, you can make Civilians hostile to other sides by using the [[setFriend]] command:
 
<code>civilianUnit setFriend [west, 0]; // Will cause civilians to shoot at West, but not West and Civilians</code>
 
Civilians will not be attacked back. No [[setCaptive]] command is needed.
 
==Two way hostility to civilians==
 
1) You can make other sides hostile to a civilian by making the civilian renegade, but this will mean other civilians too will attack the unit. Run this code on the unit:
<code>this addRating -10000; // Will cause sides to shoot civilian, but not civilian to shoot back</code>
 
When the rating gets below -2000, the unit's side switches to "ENEMY" and the unit is attacked by everyone.
 
2) To enable hostility both ways - civilians shooting at a side and the side shooting back, you need to move the civilian unit to a hostile side.
 
'''Example:'''
 
To shoot at West, you can make Resistance unfriendly to West and group the civilian unit with Resistance, or you could group them to East side.
 
===Set in the editor===
 
# Group your civilians with an East officer of higher rank than the civilians.
# put: '''deleteVehicle this''' in the officer’s initialization field (this will cause the officer not to appear)
# an alternative is to set the '''[[ArmA:_Mission_Editor#Probability_of_Presence|probability of presence]]''' slider of the officer to Zero.
# When you start the mission, the officer won't be there as he is deleted, but the civvies think they are East, will take over command and follow all waypoints, and fire on anyone on the opposite side


===Scripted approach===
=== Two way hostility with civilians ===


Causing a civilian unit to change sides during a mission by using the [[joinSilent]] command and joining them to a living officer (using an officer with '''deleteVehicle this''' in their init field will not work), will cause the civilian to attack the other side, but the other side will not attack the civilian.
To make a civilian a potential target to other sides, you can either:
* make the civilian a renegade by using the [[addRating]] command. This will make him a [[sideEnemy|renegade]], meaning an enemy to everyone including other civilians.
_civilian [[addRating]] -10000; {{cc|will cause sides to shoot civilian, but not civilian to shoot back - for that, use [[setFriend]]}}


The [[side]] command will return the correct side for units grouped with a side officer at the start of a mission, but not for units joined during a mission by means of the [[joinSilent]] command.
{{Informative | the [[sideEnemy|renegade]] rating threshold is ''below'' -2000 (e.g -2001, -5000 etc).}}


The trick to make it work is to do first:
* make the civilian [[join]] an enemy group, e.g [[east]]:
<code>[_unit] joinSilent grpNull;</code>
[[private]] _eastGroup = [[createGroup]] [[east]];
[_civilian] [[joinSilent]] _eastGroup;


and as second step:
=== Set in the editor ===
<code>[_unit] joinSilent _targetGroup;</code>


The important part is not to join them into the target group directly. So for new units use:
# Group your civilians with an [[east]] leader
# Delete the [[east]] leader on mission load:
#* Put {{Inline code|[[deleteVehicle]] [[this]]}} in the officer’s initialization field.
#* Alternatively, set the '''[[Eden Editor: System#Attributes|probability of presence]]''' slider of the officer to '''zero'''.
# On mission start, the [[east]] leader will not be here but the [[civilian]]s will be on the [[east]] side.


<code>_eastCenter = createCenter east;// if no other east unit exists in the mission
_dummyGroupEast = createGroup east;
_newUnit = _dummyGroupEast createUnit ["TK_Soldier_EP1",position player, [], 0, "FORM"];
[_newUnit] joinSilent _targetGroup;//_targetGroup could be 'group player' for example
deleteGroup _dummyGroupEast;// if you no longer need the dummy group
</code>


[[Category:ArmA_2:_Editing]]
[[Category: Scripting Topics]]
[[Category: Scripting Topics]]
[[Category:Operation Flashpoint: Editing]]
[[Category:ArmA: Editing]]
[[Category:ArmA 2: Editing]]
[[Category:Arma 3: Editing]]

Revision as of 22:54, 7 September 2019

Template:SideTOC

Arma 3
This page deals with Arma 3 sides, which has more than previous games. See the Side page to see previous titles' available sides. Also:

Sides relations

Sides friendship

Helper function: BIS_fnc_sideIsFriendly

is friendly to east west resistance civilian sideUnknown sideEnemy sideFriendly sideLogic
east Template:task/ Template:task Template:task Template:task/ Template:task Template:task Template:task/ Template:task
west Template:task Template:task/ Template:task/ Template:task/ Template:task Template:task Template:task/ Template:task
resistance Template:task Template:task/ Template:task/ Template:task/ Template:task Template:task Template:task/ Template:task
civilian Template:task Template:task/ Template:task/ Template:task/ Template:task Template:task Template:task/ Template:task
sideUnknown Template:task Template:task Template:task Template:task Template:task Template:task Template:task/ Template:task
sideEnemy Template:task Template:task Template:task Template:task Template:task Template:task Template:task/ Template:task
sideFriendly Template:task Template:task Template:task Template:task Template:task Template:task Template:task/ Template:task
sideLogic Template:task/ Template:task/ Template:task/ Template:task/ Template:task Template:task Template:task/ Template:task

Sides enmity

Helper function: BIS_fnc_sideIsEnemy

is enemy to east west resistance civilian sideUnknown sideEnemy sideFriendly sideLogic
east Template:task Template:task/ Template:task/ Template:task Template:task Template:task/ Template:task Template:task
west Template:task/ Template:task Template:task Template:task Template:task Template:task/ Template:task Template:task
resistance Template:task/ Template:task Template:task Template:task Template:task Template:task/ Template:task Template:task
civilian Template:task/ Template:task Template:task Template:task Template:task Template:task/ Template:task Template:task
sideUnknown Template:task/ Template:task/ Template:task/ Template:task/ Template:task Template:task/ Template:task Template:task
sideEnemy Template:task/ Template:task/ Template:task/ Template:task/ Template:task Template:task/ Template:task Template:task
sideFriendly Template:task/ Template:task/ Template:task/ Template:task/ Template:task Template:task/ Template:task Template:task
sideLogic Template:task Template:task Template:task Template:task Template:task Template:task/ Template:task Template:task


Change relations

  • You can set which sides resistance is friendly/enemy to in the mission editor (click on the Intel box).
  • Everyone is friendly toward civilians. Civilians AI have a total impunity and can kill any enemy without retaliation (same as captive units).
  • You can use the setFriend command to set relations between any sides (even east and west).
// will make east friendly to west and vice versa
east setFriend [west, 1];
west setFriend [east, 1];

One way hostility

Using the setCaptive command allows you to stop enemy units to fire on the target unit.

_soldier setCaptive true; // _soldier can shoot at enemy but enemy will not return fire

You can re-activate hostility by canceling captive status.

_soldier setCaptive false; // _soldier will be shot at again by enemy units

Two way hostility with civilians

To make a civilian a potential target to other sides, you can either:

  • make the civilian a renegade by using the addRating command. This will make him a renegade, meaning an enemy to everyone including other civilians.
_civilian addRating -10000; // will cause sides to shoot civilian, but not civilian to shoot back - for that, use setFriend
the renegade rating threshold is below -2000 (e.g -2001, -5000 etc).
  • make the civilian join an enemy group, e.g east:
private _eastGroup = createGroup east;
[_civilian] joinSilent _eastGroup;

Set in the editor

  1. Group your civilians with an east leader
  2. Delete the east leader on mission load:
  3. On mission start, the east leader will not be here but the civilians will be on the east side.