Jump to content
Sign in to follow this  
bangabob

Spawning civilians driving on roads

Recommended Posts

I am making a mission which involves a blufor team escaping Chernarus.

I want civilians to spawn on roads preferably driving around when the BLUFOR approach the roads ect

I have a spawnunitsciv.sqf script with this code:

if (!isServer) exitWith {};

_spawnPos = markerPos (_this select 0);

_group1 = createGroup Civilian;

_unit1 = _group1 createUnit ["Volha_2_TK_CIV_EP1", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2;

_unit2 = _group1 createUnit ["Volha_2_TK_CIV_EP1", [_spawnPos select 0,_spawnPos select 1,1], [], 1, "FORM"]; sleep 0.2;

[_group1, _spawnPos, 100, 7, "MOVE", "SAFE", "WHITE", "LIMITED", "WEDGE", [3,6,9]] call CBA_fnc_taskPatrol;

And a trigger

Condition: Blufor detected

Act: 0 = ["markername"] execVM "spawnUnitsciv.sqf";

When i use this script no civilian cars spawn. (BTW i have placed a civilian on map)

Any help would be appreciated.

Share this post


Link to post
Share on other sites

Volha_2_TK_CIV_EP1 is an empty car isn't it? createUnit is for things like infantry. createVehicle for things like vehicles (without crew).

You'd want to use BIS_fnc_spawnVehicle or spawn an empty car, then a civilian and moveInDriver the guy and assign his group the waypoints.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×