BIS_fnc_spawnEnemy

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 2: Operation Arrowhead version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Arma 2: Operation Arrowhead
Version:
1.00

Description

Description:
Spawns enemies around a player according to array of enemy classes. The units will try to hunt down the player.
This function is broken (at least in Arma 3) as it uses an undefined variable, displaying an error on each use! (typo line 30, _players )

Syntax

Syntax:
[aPlayer, target, side, classes, maxEnemies, delay, code] call BIS_fnc_spawnEnemy
Parameters:
aPlayer: Object - player
target: Object - refence object (enemies will be spawned on same direction in respect to the player)
side: Side - side of the spawned enemies
classes: Array of String - list of enemy classes (units will form a group together)
maxEnemies: Number - (Optional, default 10) maximum number of enemies at once
delay: Number - (Optional, default 30) time between spawn waves
code: Code - (Optional, default {}) - code to execute on each unit (referenced by _this)
Return Value:
Array - spawned enemies

Examples

Example 1:
[player, player, opfor, ["O_Soldier_F"]] spawn BIS_fnc_spawnEnemy;

Additional Information

Execution:
call
Multiplayer:
-
See also:
BIS_fnc_spawnGroupBIS_fnc_stalk

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section