Jump to content
Sign in to follow this  
_qor

Using BIS_fnc_Unitplay on spawned vehicles

Recommended Posts

Hey there,

I already captured the movements for a suicide car, which blows up some enemy establishments > works!

This event should be later on in the mission, so I'd like to spawn the vehicle and then play the movements instead of having the vehicle on the map all over the mission.

But apparently there is a problem with referring to the vehicle's name.

_veh = [getMarkerPos "SScarMark", 180, "hilux1_civil_3_open_EP1", CIVILIAN] call bis_fnc_spawnVehicle;

SuicideCar2 = _veh select 0;

rec = [] spawn RecPath2;

This is the only thing I changed, the script which contains the data for movements still refers to a vehicle called "SuicideCar2". But the vehicle doesnt move.

I already tried with createVehicle, same problem.

init.sqf

RecPath2 = compile preprocessfile "SScar.sqf";

SScar.sqf

Path2
=
[##position datas##];

[suicideCar2, Path2] spawn BIS_fnc_UnitPlay;

Edited by _qoR

Share this post


Link to post
Share on other sites

Thanks!

So at least I found a workaround for this:

Due to the case that UnitPlay will start from the captured position, you can put the vehicle wherever you want on the map where it won't disturb the mission.

Unfortunately this doesnt help when vehicle is destroyed (like my suicide car) and you want to play movements again.

Additionally, setting enableSimulation to false will ensure that the unit inside won't flee (also prevents civilians from fleeing when in danger).

It seems that vehicle used for UnitCapture/Play must not be empty.

At the moment trying this way:

abc = createVehicle ["hilux1_civil_3_open_EP1", getMarkerPos "hdSB1", [], 0, "NONE"];


_grp = createGroup civilian;

_unit = _grp createUnit ["TK_CIV_Woman01_EP1", getMarkerPos "hdSB1",[],0,"FORM"];


_unit moveInDriver abc;

Vehicle and civilian get spawned, but the civilian doesnt move in as driver. Why?

Edited by _qoR

Share this post


Link to post
Share on other sites

you are kidding me... -.-

actually women are the same AI as men, except there is another "make-up". Why did the developers distinguish between make-up man and make-up woman?

Never mind! Gonna change it to a man ;D

> its working this way

SuicideCar = createVehicle ["hilux1_civil_3_open_EP1", getMarkerPos "SScarMark", [], 0, "NONE"];

_grp = createGroup civilian;

_unit = _grp createUnit ["TK_CIV_Takistani03_EP1", getMarkerPos "SScarMark",[],0,"FORM"];

_unit moveInDriver SuicideCar;


Path1
=[[###position data###];

[suicideCar, Path1] spawn BIS_fnc_UnitPlay;

Edited by _qoR

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  

×