Alien Entity Behavior – Arma 3
Kategoria:Arma 3: Editing The information on this page could be considered a spoiler for the "First Contact" campaign
Overview
The small Alien Entity (AE - referred to as Drone in technical systems) is used by ET for surveillance, reconnaissance, research, and defense as needed. It is made from unknown and supremely tough materials. The entity has local control of gravity, and it moves in pulses. It can collect and utilize almost any type of matter from the local environment. The AE appears to communicate on the broad electromagnetic spectrum.
Around its central solid hull, the entity can hold one or more modules in its orbit. These do not themselves have propulsion, so they cannot move out of the entity's sphere of influence. Various types of module exist:
- Scan Module: used to inspect nearby objects and materials
- Gravity Tool Module: used to process and launch collected matter in two lethal modes:
- Matter Shot: a precise single shot of matter
- Matter Burst: a multi-round burst of matter
- Matter: used to store collected matter as a resource
- If it runs out, the entity will collect more from any surface
- If it gets dislodged from its orbit, it will fall to the ground and decay (there is some danger to those who get close)
The entity also features several countermeasures:
- Anti-Projectile System: this can 'catch' and re-direct various slower speed projectiles (it can be overwhelmed)
- Audiovisual Deception: this uses light and sound to disorient threats
- Gravity Matter Swarm: this launches a cluster of semi-guided area denial projectiles
- Gravity Matter Push: this launches matter in all directions as a less-than-lethal defense against nearby threats
At this time there are no known vulnerabilities to Earth weapons, and the entity typically withdraws before any major damage can be inflicted.
Drone
Drone init
After Alien Entity (Small) is placed on the map, you need to execute following functions before you get your drone fully operational.
Setting movement grid
Drone is only able to move in generated grid. It can be generated on fly via bin_fnc_setObjectGrid or by using movement grid module.
Syntax:
Parameters:
- drone: Object - Object to which grid is attached
- position: Array - PositionATL where drone grid should be created
- cellSizeX (Optional) - Number - size of movement cell in x axis (meters). Default 4
- cellSizeY (Optional) - Number - size of movement cell in y axis (meters). Default 4
- cellSizeZ (Optional) - Number - size of movement cell in z axis (meters). Default 16
- resolutionX (Optional)- Number - number of cells in x axis. Default 20
- resolutionY (Optional) - Number - number of cells in y axis. Default 20
- resolutionZ (Optional) - Number - number of cells in z axis. Default 3
Setting movement properties
The way drone moves can be changed via following function. List of all available movement types is listed in section below
Syntax:
Parameters:
- drone: Object - Object to which movement properties are attached
- movementProperties: String - Name of movement class
Initializing drone scripted sound system
Syntax:
Parameters:
Initializing drone behavior system
Syntax:
Parameters:
- drone: Object - Object to which movement properties are attached
- behaviorType: String - Name of behavior type. Can be either "Drone" or "DroneCombat". Default behavior is "Drone"
Example code
[bin_drone,"Drone"] call bin_fnc_behaviorInit; [bin_drone,"Drone"] call bin_fnc_setMoveProperties; [bin_drone,position bin_drone,nil,nil,nil,5,5,3] call bin_fnc_setObjectGrid; [bin_drone] call bin_fnc_soundDrone; |
Switching behaviors
Behaviors listed below can be used with bin_fnc_setBehavior & bin_fnc_setBehaviorCoef.
bin_fnc_setBehavior is using following syntax:
Parameters:
- drone: Object - Object to which movement properties are attached
- behaviorName: String - Name of behavior type. Can be either "Drone" or "DroneCombat". Default behavior is "Drone"
- parameters (Optional): Array - Optional parameters which can be passed to behavior. Default empty array
- terminate (Optional): Boolean - If true, currently executed behavior will be terminated and new one will be executed right after termination of existing one is completed. Default false
- interrupt (Optional): Boolean - Determines if behavior should terminated immediately. In case of i.e. research behavior it means that instead of gently putting back scanned object, it will be dropped on ground right away. Default false
Example:
List of available behaviors
Name | Description | Available parameters |
---|---|---|
Patrol | Drone will move around looking for enemy contacts | |
Investigate | Drone will look at nearest unit | 0: target (Optional): Object - object at which Drone will look at |
GravityCannon | If combat modules are present, Drone will use them to engage either random nearby target or | 0: target (Optional): Object - target for gravity cannon
1: weapon (Optional): String - can be GravityShotgun_01, GravityCannon_01 or GravityCannon_01_Precise |
MissileSwarm | Drone will use area of effect weapon releasing 5 missile like projectiles at nearby targets | |
Jump | Drone will perform jump to specified location | 0: position - Array or String - PositionATL - position to move. If string is provided, Drone will jump to precalculated grid located in provided file.
1: charge (Optional) - Boolean - optional parameters controling if drone should be charging power before making jump. Default false. 2: fast (Optional) - drone will jump up straight away if it's set to true, default false. If number is provided, drone will pick fast jump if distance is above that value. |
Avoid | Drone will try to avoid contact with nearby units by moving away from them | |
Research | Drone will perform research behavior on nearby objects | 0: target (Optional) - Object - target to scan. If not specified drone will try to pick some random object in available grid.
1: endless (Optional) - Boolean - research will be performed till it's interrupted by script |
Light | Drone will use light burst weapon and try to move away from incoming fire | |
GravityBurst | Drone will use gravity burst when units are nearby | |
CollectMatter | Drone will collect 4 matter balls which serves as gravity cannon magazines | |
Reposition | Drone will move 100 meters away from incoming fire |
Scripted Event Handlers
Name | Output | Description |
---|---|---|
behaviorStarted | 0: Object
1: Behavior name |
Triggers when new behavior FSM is triggered |
behaviorCompleted | 0: Object
1: Behavior name |
Triggers when new behavior FSM is completed. It will be also fired when behavior was interrupted! |
Example code:
|
Editing move properties
Movement properties can be modified with in game editor. In order to access it, type following code in console & execute it
You can add points to that graph by double clicking on middle area. It's possible to move those points once they are created. When you are are ready, press "Copy" button and paste result to your config. It's not possible right now to read those values from mission files at the moment.
class Movement
{
class Templates
{
#define CURVE <nowiki>{{0,0,0},{0.3,0.9,0},{0.5,0.9,0},{0.5,1.070,0},{0.5,1,0}}</nowiki>
#define CURVE_LONG <nowiki>{{0,0,0},{0.3,0.9,0},{0.5,0.9,0},{0.5,1.024,0},{0.5,1,0}}</nowiki>
#define CURVE_END <nowiki>{{0,0,0},{0.5,1,0},{0.7,1,0},{1,1,0}}</nowiki>
#define CURVE_ROT <nowiki>{{0,0,0},{0,2,0},{0.9,1,0},{1,1,0}}</nowiki>
class Default
{
speed = 8; // Average travel speed in m/s
pulseDistance = 100; // Distance between pulses
maxPulseDistanceFar = 100; // Maximum distance between pulses in long-distance travel
maxPulseDistanceClose = 3; // Maximum distance between pulses in short-distance travel
altitude = 100; // Altitude above terrain level for long jumps
curve[] = <nowiki>{{0,0},{1,1}}</nowiki>; // Movement curve
curveEnd[] = <nowiki>{{0,0},{1,1}}</nowiki>; // Movement curve on the last waypoint (smoother settle-in)
curveRotation[] = <nowiki>{{0,0,0},{1,0,0},{0,1,0},{1,1,0}}</nowiki>;
};
class Drone: Default
{
speed = 7;
curve[] = CURVE;
curveEnd[] = CURVE_END;
curveRotation[] = CURVE_ROT;
};
class Drone_Intro3: Drone
{
speed = 12;
pulseDistance = 550;
maxPulseDistanceFar = 550;
};
class Drone_Long: Drone
{
speed = 14;
pulseDistance = 250;
maxPulseDistanceFar = 550;
curve[] = CURVE_LONG;
};
class CombatDrone: Default
{
speed = 14;
maxPulseDistanceFar = 40;
curve[] = CURVE;
curveEnd[] = CURVE_END;
curveRotation[] = CURVE_ROT;
};
class CombatDrone_Fast: Default
{
speed = 28;
maxPulseDistanceFar = 40;
curve[] = CURVE;
curveEnd[] = CURVE_END;
curveRotation[] = CURVE_ROT;
};
class CombatDrone_Long: Default
{
speed = 28;
pulseDistance = 500;
maxPulseDistanceFar = 1000;
curve[] = CURVE_LONG;
curveEnd[] = CURVE_END;
curveRotation[] = CURVE_ROT;
};
class ModularShip: Default
{
speed = 2;
curve[] = CURVE;
curveEnd[] = CURVE_END;
curveRotation[] = CURVE_ROT;
};
};
Located in a3\Functions_F_Contact\cfgContact.hpp
Handy commands list
Command | Description | Notes | |
---|---|---|---|
bin_drone setVariable ["#bD",1]; | Set danger level on drone. Danger goes from 0 (no danger) to 1 (maximum danger) | ||
bin_drone setVariable ["#bState","Combat"] | Sets drone behavior to selected state. Currently supported modes are "Safe" & "Combat" | ||
bin_drone setVariable ["#bTarget",player]; | Set target for drone gravity cannon | ||
[west,0] call bin_fnc_setTargetWeight - all units from side "west" will be ignored by targeting system
[player,10] call bin_fnc_setTargetWeight - Increase player chance of being targeted by drone weapons [bis_car,0] call bin_fnc_setTargetWeight - Vehicle & it's crew will be ignored by targeting system |
Coef to target priority - set to 0 to basically exclude drone from target selection. Function accepts group, side, vehicle or unit. | Applied to individual unit, side or vehicle - not the drone! | |
[bin_drone,"gravitycannon",[cursorObject,"GravityShotgun_01"]] call bin_fnc_setBehavior | Forces drone to target specific object | ||
[bin_drone,"gravityCannon",10] call bin_fnc_setBehaviorCoef; | Change probability of picking specific behavior | ||
[bin_module_01,player,"GravityCannon_01_Precise",false,1] call bin_fnc_setDroneModuleTarget; | Targets & fires module at player |
| |
[bin_drone,"SwarmMissile_01_launcher_F"] call bis_fnc_fire; | Manually trigger missile swarm |
Modules
Setting up modules
Creating module
In order to create module use following function. You don't need to place drone module on map itself!
Syntax: _module = [drone, moduleClassName, moduleType] call bin_fnc_initDroneModule;
Parameters:
- drone: Object - Parent object to which modules are attached
- movementProperties: String - Class name of vehicle to create. List of available module is available below
- moduleType: String type of module to register - currently "combat", "matter" & "science" are available.
List of available modules
I, B, O are abbreviation for factions - I = Independent, B - Blufor, O - Opfor
Module variables
Name | Variable | Notes |
---|---|---|
Interval | bin_droneModule_interval | Sets how strictly module is following the drone. 0 means it's basically out of control where 1 |
Radius | bin_droneModule_radius | Radius of module orbit (calculated from Drone center) |
Height | bin_droneModule_height | Height offset of the module orbit (calculated from Drone center) |
Rotational speed | bin_droneModule_rotationTime | How much time it takes to perform one full rotation |
Damage | bin_droneModule_damage | By default, modules damage is synced to damage status of parent vehicle. With this variable it's possible to override this behavior and either enable or disable damage completely. |
Example
_module_1 = [BIN_drone,"I_A_AlienDrone_Module_02_F ","combat"] call bin_fnc_initDroneModule;
_module_1 setVariable ["bin_droneModule_interval", 0.75];
_module_1 setVariable ["bin_droneModule_radius", 4.28683];
_module_1 setVariable ["bin_droneModule_height", 1.5];
_module_1 setVariable ["bin_droneModule_rotationTime", 6.5];