-
Notifications
You must be signed in to change notification settings - Fork 5
EandEcheck
| File location | f\EandEcheck\f_EandECheckLoop.sqf |
| Enabled by default? | no |
| Enable/Disable in | init.sqf |
| Runs on | Server |
For multiplayer E&E (escape and evade) missions one of the challenges is knowing how to end the mission following a successful escape. To begin with, what is a successful escape? One escapee making it to the safe zone, or all living escapees? The E&E Check component allows you to end a mission when either specific survivors or all surviving members of a named group are within a defined distance of a named object or a marker.
In the ArmA 3 editor, place an object or marker at the escape point and ensure it has a name in the Name field (such as objectName).
Still in the editor, make sure either the units or the groups that you want to act as the escapees are named using either their Name field. Note that all units and groups in the F3 Folk ARPS Platoons have names already, which you can use.
Open the file init.sqf and look for the code segment entitled:
// F3 - Group E&E CheckEdit the following line, removing the // at the start, replacing
side with a Side variable,
or ["Grp1","Grp2"] with a list of group or unit names as strings,
ObjectName or "MarkerName" with the name of the object or marker you placed at the escape point,
100 with the maximum distance (in metres) that the players have to be from the object to be considered safe, and 1 with the ending you would like triggered when all surviving members of the named group are safe (the component automatically triggers the Multiplayer Ending Controller).
// [side,ObjectName or "MarkerName",100,1] execVM "f\EandEcheck\f_EandECheckLoop.sqf";
// [["Grp1","Grp2"],ObjectName or "MarkerName",100,1] execVM "f\EandEcheck\f_EandECheckLoop.sqf";f\EandEcheck\f_EandECheckLoop.sqf accepts the following parameters:
| # | name | type | description |
|---|---|---|---|
| 0 | _objects | side | side of units |
| array of strings | group names | ||
| 1 | _obj | string | Marker Name |
| variable | Object Name | ||
| 2 | _safeDistance | number | Maximum distance in metres to the _objunits have to be, to be considered safe. |
| 3 | _end | number | Ending number to be triggered |
| code | Code to be executed | ||
| 4 | _playersonly (optional) | boolean | When true, only playable units are considered when a side was passed. (default = true) |
For example, to trigger ending #3 when all surviving members of the group GrpPrisoners are within 250m of the object called EscapeBoat, change the line to:
[["GrpPrisoners"],EscapeBoat,250,3] execVM "f\EandEcheck\f_EandECheckLoop.sqf";If you want a specific unit to escape, replace the group name with the unit name, for example:
[["Prisoner"],EscapeBoat,250,3] execVM "f\EandEcheck\f_EandECheckLoop.sqf";You can also use an array of groups or units instead of a single group or unit name. For example:
[["Prisoner","GrpPrisoners"],"MarkerEscape",250,3] execVM "f\EandEcheck\f_EandECheckLoop.sqf";In this case both the group named GrpPrisoners and the single unit named Prisoner would need to be in 250m of the marker named MarkerEscape
You can also simply use a side variable to have the component check for all relevant units:
[west,"MarkerEscape",250,3] execVM "f\EandEcheck\f_EandECheckLoop.sqf";If you want the E&E Check component to trigger some custom code instead of a pre-defined ending you can replace the number indicating the ending with any block of code.
For example, if you wanted to display a hint saying "We are safe!" instead of triggering an ending you would use:
[["GrpPrisoners"],EscapeBoat,250,{hint 'We are safe!'}] execVM "f\EandEcheck\f_EandECheckLoop.sqf";This code will be run on all clients and the server.
Note: The custom code you want to execute in place of a pre-defined ending must be enclosed within curly braces: {}
By default the script only checks for playable units of the parsed side. To enable checking for non-playable units add false as the last parameter:
[west,"MarkerEscape",250,3,false] execVM "f\EandEcheck\f_EandECheckLoop.sqf";- You might want to use the Casualties Cap component to trigger a different ending if all members of the escapee group are killed.
- Always make sure to pass unit and group names as strings.
- Marker-Names need always be passed as strings/in quotation marks (like so:
"MarkerName")
- Assign Gear
- Assign Gear AI
- Authorized Crew Check
- Briefing
- Casualties Cap
- Disable Thermals
- Dynamic View Distance
- E & E Check
- FCS
- Fire Team Member Markers
- Group Markers
- Group Join
- Map Click Teleport
- Medical System
- Mission Conditions
- Multiplayer Ending Controller
- Nametags
- Premount
- Radio
- Remove Body
- Safe Start
- Group ID
- Color Teams
- AI Skill
- Spectator
- Zeus Support