Side Relations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Improved wording and structure.)
Line 1: Line 1:
==Sides and Factions==
==Sides==
The game consists of 8 [[Side]]s: West, East, Civilian, Resistance, sideLogic, Friendly, Enemy or Unknown. You can determine which [[Side]] a unit is on by using the [[side]] command.


Sometimes you may want to use the [[faction]] command. Factions are slightly different to [[Side]]s. A US vehicle driven by a Russian will respond as belonging to the East [[Side]], but the USMC [[faction]].
The game consists of 8 [[Side]]s:
* West
* East
* Civilian
* Resistance
* sideLogic
* Friendly
* Enemy
* Unknown


==Setting relations==
You can determine which [[Side]] a unit is on by using the [[side]] command.
You can set which sides Resistance is friendly to in the mission editor (click on the Intel box). However, it is not possible to change the Resistance side relationship during a game.
 
{{Important|NOTE: Make sure to recognize the difference between the [[Side]] data type (''setter'') and the textual [[side]] display (''getter'').}}
 
==Factions==
 
Factions are 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).  
 
{{Important|NOTE: It is not possible to change the Resistance side relationship during a game.}}


Everyone is friendly toward Civilians. This means an armed Civilian will be able to slaughter unfriendly AI troops with impunity.
Everyone is friendly toward Civilians. This means an armed Civilian will be able to slaughter unfriendly AI troops with impunity.


You can use the [[setFriend]] command at the initialisation of a mission to set relations. It is even possible to make Russian and American troops friendly and greet one another on the road.
2) You can use the [[setFriend]] command at the initialization of a mission to set relations. It is even possible to make Russian and American troops friendly and greet one another.


<code>EAST setFriend [WEST, 1];
<code>EAST setFriend [WEST, 1];
WEST setFriend [EAST, 1];</code>
WEST setFriend [EAST, 1];</code>


===Hostile Civilians===
==Arming Civilians==
You can arm Civilians by inserting code like the following in their initialisation field:
 
You can arm Civilians by inserting code like the following in their initialization field:


<code>this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911"; </code>
<code>this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911"; </code>


However, by default, no soldiers will shoot civilians, even when fired upon (same as for [[captive]]s)
{{Important|NOTE: By default no soldiers will shoot civilians, even when fired upon (same as for [[captive]]s).}}


==One way hostility==
==One way hostility==
Using the [[setCaptive]] command allows you to protect a unit from return fire.
 
1) 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>
<code>soldier1 setCaptive true; // soldier1 unit can shoot at enemy, but enemy will not return fire</code>


You can re-activate hostility by cancelling captive status.
You can re-activate hostility by canceling captive status.
<code>soldier1 setCaptive false; // soldier1 is now fair game for enemy.</code>
<code>soldier1 setCaptive false; // soldier1 will be shoot at again by enemy units</code>


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:


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>


<code>civilian 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.


Civilians will not be attacked back. No [[setCaptive]] command is needed.
==Two way hostility to civilians==


===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:
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>
<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.
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.
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:'''
'''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.
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.
# Group your civilians with an East officer of higher rank than the civilians.
# put: '''deletevehicle this''' in the officer’s initialisation field (this will cause the officer not to appear)
# 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|probabilty of presence]]''' slider of the officer to Zero.
# 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
# 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===


Causing a civilian unit to change sides during a mission by using the [[joinSilent]] command and joining them to a live 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. Two way hositility must occur using the above method instead.
Causing a civilian unit to change sides during a mission by using the [[joinSilent]] command and joining them to a live 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. Two way hostility must occur using the above method instead.


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.
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.

Revision as of 12:46, 6 March 2011

Sides

The game consists of 8 Sides:

  • West
  • East
  • Civilian
  • Resistance
  • sideLogic
  • Friendly
  • Enemy
  • Unknown

You can determine which Side a unit is on by using the side command.

NOTE: Make sure to recognize the difference between the Side data type (setter) and the textual side display (getter).

Factions

Factions are 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).

NOTE: It is not possible to change the Resistance side relationship during a game.

Everyone is friendly toward Civilians. This means an armed Civilian will be able to slaughter unfriendly AI troops with impunity.

2) You can use the setFriend command at the initialization of a mission to set relations. It is even possible to make Russian and American troops friendly and greet one another.

EAST setFriend [WEST, 1]; WEST setFriend [EAST, 1];

Arming Civilians

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

this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911";

NOTE: By default no soldiers will shoot civilians, even when fired upon (same as for captives).

One way hostility

1) Using the setCaptive command allows you to stop enemy units to fire on the target unit. soldier1 setCaptive true; // soldier1 unit can shoot at enemy, but enemy will not return fire

You can re-activate hostility by canceling captive status. soldier1 setCaptive false; // soldier1 will be shoot 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:

civilianUnit setFriend [west, 0]; // Will cause civilians to shoot at West, but not West and Civilians

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: this addRating -10000; // Will cause sides to shoot civilian, but not civilian to shoot back

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

  1. Group your civilians with an East officer of higher rank than the civilians.
  2. put: deleteVehicle this in the officer’s initialization field (this will cause the officer not to appear)
  3. an alternative is to set the probability of presence slider of the officer to Zero.
  4. 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

Causing a civilian unit to change sides during a mission by using the joinSilent command and joining them to a live 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. Two way hostility must occur using the above method instead.

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.