Jump to content
Sign in to follow this  
Two Dogs

BIS_fnc_spawnVehicle in script?

Recommended Posts

Can someone tell me whats wrong with this?

//Spawn Script.  Spawns Vehicle, Driver, Gunners, and Passengers on the server

private=[_veh,_posArray]
//aray of markers for waypoints
_posArray = ["spn","wp1","wp1_1","lz1"];

_veh = [getMarkerPos (_posArray select 0), 180,"MV22",WEST] call BIS_fnc_spawnvehicle;


for [{_i=0}, {_i < count _posArray}, {_i=_i+1}] do
{
    [_veh1 select 1,getMarkerPos(_PosArray select _i), 0, “MOVEâ€, “CARELESSâ€, “GREENâ€, “NORMALâ€] call CBA_fnc_addWaypoint;

};
hint"Look check map for osprey";

Called from a radio trigger:

v = []execVM"my_cript.sqf";

I've been away from scripting for some time and struggling with simple shit.

Does Arma 3 still need a "Functions Module" on the map?

This has to be something simple right?

Any help appreciated.

Share this post


Link to post
Share on other sites

Here you are calling the return from the array _veh:

_veh = [getMarkerPos (_posArray select 0), 180,"MV22",WEST] call BIS_fnc_spawnvehicle;

But here you refer to it as _veh1:

for [{_i=0}, {_i < count _posArray}, {_i=_i+1}] do
{
    [_veh1 select 1,getMarkerPos(_PosArray select _i), 0, “MOVEâ€, “CARELESSâ€, “GREENâ€, “NORMALâ€] call CBA_fnc_addWaypoint;

Try something like this:

//Spawn Script.  Spawns Vehicle, Driver, Gunners, and Passengers on the server

private ["_veh","_posArray"];
//aray of markers for waypoints
_posArray = ["spn","wp1","wp1_1","lz1"];

_veh = [getMarkerPos (_posArray select 0), 180,"MV22",WEST] call BIS_fnc_spawnvehicle;


for [{_i=0}, {_i < count _posArray}, {_i=_i+1}] do
{
    [_veh select 1, getMarkerPos (_PosArray select _i),  0,  “MOVEâ€,  “CARELESSâ€,  “GREENâ€,  “NORMALâ€] call CBA_fnc_addWaypoint;
};
hint"Look check map for osprey";

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  

×