Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _start = _this select 0;
- _direction = _this select 1;
- _amount = _this select 2;
- _i = 1;
- _selectclass = {
- _class = ["BPZombie_Guardian1", "BPZombie_Guardian2", "BPZombie_Guardian3", "BPZombie_Hunter1", "BPZombie_Hunter2", "BPZombie_Hunter3", "BPZombie_Rebel1", "BPZombie_Rebel2", "BPZombie_Rebel3", "BPZombie_Refugee1", "BPZombie_Refugee2", "BPZombie_Refugee3", "BPZombie_Survivalist1", "BPZombie_Survivalist2", "BPZombie_Survivalist3"] call bis_fnc_selectrandom;
- };
- _spawnzombies = {
- call _selectclass;
- _zombiegroup = [getpos _start, EAST, [_class, _class, _class],[],[],[],[],[],_direction] call bis_fnc_spawngroup;
- hint "test";
- _units = units _zombiegroup;
- {_x enableSimulation true;} forEach _units;
- _zombiegroup call _addwaypoints;
- systemchat format ["%1", _zombiegroup];
- };
- _addwaypoints = {
- _zombiegroup = _this;
- while {alive player} do {
- _distance = random 2;
- _wdir = random 360;
- _wx = (getPos player select 0) + (_distance * (sin _wdir));
- _wy = (getPos player select 1) + (_distance * (cos _wdir));
- _wp = _zombiegroup addWaypoint [ [_wx,_wy] , 10, _i ];
- if ( _i == 1 ) then {
- [_zombiegroup, _i] setWaypointBehaviour "AWARE";
- [_zombiegroup, _i] setWaypointCombatMode "RED";
- [_zombiegroup, _i] setWaypointFormation "COLUMN";
- };
- };
- _wp = _zombiegroup addWaypoint [_start,10,_amount];
- [_zombiegroup, _amount] setWaypointType "CYCLE";
- };
- call _spawnzombies;
- //_spawn = _class createUnit [getpos _start, group player, "zombiegrp1 = this; this enablesimulation true"];
Advertisement
Add Comment
Please, Sign In to add comment