Skip to content

function descriptions

浮生歇尽 edited this page Oct 30, 2024 · 1 revision

Welcome to the GroundBreaking-Scripts wiki!

The function descriptions in Chinese will not be added here. You can find this information on the Steam Workshop page, the "Function Viewer," and my Bilibili videos. This section mainly focuses on function explanations.


JLS_fnc_missileComing

Description:

Series of settings: Leviathan mecha launches missiles into the sky, generating a lot of smoke near it and under the players' feet, followed by the same number of missile attacks.

Syntax:

[Source, Radius, Number, Ammo, Target, Time, Bool] spawn JLS_fnc_missileComing;

Parameters:

  1. Source: object - the center of the attack range;
  2. Radius (optional): radius - range of missile generation, default 200 (no missile will be generated at 40 meters near Leviathan, maximum range=40+200);
  3. Number (optional): Number - Number of missiles generated, default: 3-6;
  4. Ammo (optional): Character - Type of bullet generated, default: "Rocket_04_AP_F";
  5. Target (optional): Object or array - main attack object, default: all players;
  6. Time (optional): Number - The duration of the digital smoke warning, and the missile will arrive after it stops generating (not disappearing);
  7. Text (optional): Boolean - Whether to display warning messages on the screen, default to true.

Return:

Nothing

examples:

[BIS_Tank, 100, 16 + random 8, "Sh_120mm_HEAT_MP_T_Red", nil, 5, true] spawn JLS_fnc_missileComing;
[BIS_source, nil, nil, nil, units BIS_playergroup, nil, false] spawn JLS_fnc_missileComing;
[player, nil, nil, nil, units BIS_EnemyGroup] spawn JLS_fnc_missileComing;


JLS_fnc_MissileRain

Description:

Randomly generate a certain number of missiles in the air near the provided location, and the missiles will fall at a certain speed. Finally, a fixed missile attack center coordinate will be generated.

Syntax:

[Position, Radius, Number, Ammo, Target] spawn JLS_fnc_MissileRain;

Parameters:

  1. Center : Array - A positional array in [x, y, z] format;
  2. Radius (optional) : Radius - The range of the generated missile, default to 200;
  3. Number (optional) : Number - Number of missiles, default to 5-10;
  4. Ammo (optional): String - Ttype of bullet generated, default to "Rocket_04_AP_F";
  5. Target (optional) : Object or Array - Additional attack objects (even outside the predetermined range), default: Nothing.

Return:

Nothing

examples:

[[5000, 5000, 0], 300, 10 + random 5, "Sh_155mm_AMOS", units player] spawn JLS_fnc_MissileRain;
[getposATL player, 200] spawn JLS_fnc_MissileRain; // Generate 200 meters at the center of the player.
[getposATL player] spawn JLS_fnc_MissileRain;


JLS_fnc_NearEnemyVehicle

Description:

Return to an enemy vehicle target (Excluding vehicles with prisoners and vehicles without members, as well as all ships) near the player's line of sight.

Syntax:

[ Distance, type, Hostile] call JLS_fnc_NearEnemyVehicle;

Parameters:

0 (Optional): Distance - Number. Scan range, default: 2000 metre;
1 (Optional): String - Target type. List of allowed type ,One of the following:("Air","landVehicle","all").default: "all";
2 (optional): Hostile - Boolean value. Hostile or not: 1. True. only includes hostile vehicles 2. False. include all vehicles

Return:

Object - Expected type of vehicle, if there is no match, return Objnull

examples:

[] call JLS_fnc_NearEnemyVehicle;

// Finds any land vehicle within 500 meters
[500 ,"landVehicle", false] call JLS_fnc_NearEnemyVehicle;

// Set target for fired missiles through event handler`` vehicle player addEventHandler ["Fired", {`

params ["","","","","","","_projectile"];
_target = [1000, "air"] call JLS_fnc_NearEnemyVehicle;
_projectile setMissileTarget _target;
}];


JLS_fnc_nearVehicleTarget

Description:

Returns a random enemy vehicle target near the specified unit's facing direction. By default, vehicles that have been set as captives and empty vehicles are not considered.

Syntax:

[unit, radius, type, enemyOnly] call JLS_fnc_nearVehicleTarget;

Parameters:

0.Unit (optional) : Object - The unit to be used as the perspective and center for considering vehicles within range.
1.radius (optional) : Number - The scanning distance, default is 1500 meters.
2.Type (optional) : String or string array - The types to search for, should use main categories like "Air", ["ship","air"], "LandVehicle", etc. Excessive subtypes may reduce retrieval speed. See isKindOf. Default: "LandVehicle".
3.enemyOnly (optional) : Boolean - Whether to consider only hostile vehicles. 1. true includes only hostile vehicles. 2. false will include all vehicles.

Return Value:

Object - Expected type of vehicle, if there is no match, return Objnull

examples:

[] call JLS_fnc_nearVehicleTarget;

// 寻找500米范围的任何陆地载具 Finds any land vehicle within 500 meters [nil, 500 ,"landVehicle", false] call JLS_fnc_nearVehicleTarget;