-
Notifications
You must be signed in to change notification settings - Fork 1
Force Shooting
Mike-MF edited this page Dec 30, 2022
·
3 revisions
This page will explain the usage of the Force Shooting function.
/*
* Author: Jonpas, Rory, Mike
* Orders a unit to target an object and begin firing until either the shooter or target is dead or the timer elapses.
* Firemode types Single (0) and Full auto (1)
* Set firing timer to 0.1 for full auto
* Designed ONLY for infantry, using with vehicles will result in undefined behaviour.
*
* Arguments:
* 0: AI Shooter <OBJECT>
* 1: Target <OBJECT>
* 2: Firemode <NUMBER> (default: 0)
* 3: Timer <NUMBER> (default: 10)
* 4: Time between shots <NUMBER> (default: 1)
*
* Return Value:
* None
*
* Example:
* [shooter, target] call MFUNC(forceShooting)
* [shooter, target, 20] call MFUNC(forceShooting)
* [shooter, target, 30, 0.5] call MFUNC(forceShooting)
*/
This function is designed for INFANTRY ONLY. Usage on vehicles is not supported.
It will force a unit to target an object of your choosing and fire at it in your selected firemode, time between shots can also be specified along with the amount of time the "firing" will go on for.
Called Globally from a trigger or via init.sqf
Example:
[My_Unit, My_Target] call TAC_Mission_fnc_forceShooting;
Example without defaults:
[My_Unit, My_Target, 1, 10, 0.4] call MFUNC(forceShooting);
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