-
Notifications
You must be signed in to change notification settings - Fork 1
Hunt
Mike-MF edited this page Mar 31, 2024
·
4 revisions
This page will explain the usage of the Hunt function.
/*
* Author: Mike
* Has an enemy group hunt a player group.
* If no hunted group is given it will select nearest player group within a given distance and target those.
* Hunt groups are capped to a maximum of 6 for performance reasons.
*
* Call on the server.
*
* Arguments
* 0: Hunter Group <GROUP>
* 1: Waypoint Refresh <NUMBER> (Optional - Default: 10)
* 2: Hunted Group <GROUP> (Optional - Default grpNull)
* 2: Search Distance <NUMBER> (Optional - Default 1000)
*
* Return Value:
* None
*
* Example:
* [Enemy_Group] call MFUNC(hunt)
* [Enemy_Group, 10] call MFUNC(hunt)
* [Enemy_Group, nil, Player_Group] call MFUNC(hunt)
* [Enemy_Group, nil, nil, 2000] call MFUNC(hunt)
*/
This function will take a provided group or select the closest player group within a set radius and actively hunt them down until one group is dead.
The defaults provided are quite performance friendly, but because the performance of this function doesn't scale well it is now locked to a maximum of 6 hunter groups at any one time.
Called from a trigger with a server check or initServer.sqf
Example:
if (isServer) then {
[My_Enemy_Group] call TAC_Mission_fnc_hunt;
};
Example without defaults:
if (isServer) then {
[My_Enemy_Group, 10, nil, 2000] call TAC_Mission_fnc_hunt;
};
Pages
- Home
- Your First Mission
- Creating A Mission
- Contract Missions
- Difficulty Guidelines
-
Functions Library
- Base Spectator
- Bomber
- Car Alarm
- Chemical Detector
- Collect Intel
- Connect Battery To Defusable
- Contamination Gas
- Count Alive
- Dialogue
- Disable AI
- Download Intel
- Earthquake
- Enable AI
- Force Shooting
- Ground Fog
- Hunt
- Lock Doors
- Mark Buildings
- Monitor Units
- Mortar Strike
- Ping
- Players
- Reaction
- Reinforcements
- Reinforcement Waves
- Respirator Effects
- Set Sleeping
- Sound Source
- Surrender
- Switch Action
- Teleport
- Toggle Lights
- Trigger Area
- Helicopters
- Resources
- Quality Checklist
- Useful Commands
- ArmaQDL