Jump to content
Sign in to follow this  

Recommended Posts

Trying to spawn in a plane , it spawns in but the it is on the ground not flying ?

_Su34veh = [getMarkerPos "vipspawn", (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;

Is there a way to gte it to fly and not be on the ground ?

Thanks

Share this post


Link to post
Share on other sites

Spawn it in the air. :)

setPosATL

_Su34veh = [getMarkerPos "vipspawn", (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;
(_Su34veh select 0) setPosATL [(getPosATL (_Su34veh select 0) select 0), (getPosATL (_Su34veh select 0) select 1), 200];

or:

_SpawnPos = [(getMarkerPos "vipspawn" select 0), (getMarkerPos "vipspawn" select 1), 200];
_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;

Share this post


Link to post
Share on other sites

Thanks that done the job !

I wanted to then use UPSMON so it will go on patrol, i am getting am error type array expected,

should this work ?

_SpawnPos = [(getMarkerPos "vipspawn" select 0), (getMarkerPos "vipspawn" select 1), 500];
_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle; 
[(units _Su34veh) select 0, "patrol_all","spawned","delete:",200] execVM "scripts\upsmon.sqf";

Share this post


Link to post
Share on other sites

Nope, that's not correct. According to this the return values are these:

_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;

_Plane = _Su34veh select 0;

_Crew = _Su34veh select 1;

_Group = _Su34veh select 2;

Since UPSMON has to be executed on the group leader, it has to look like this:

_SpawnPos = [(getMarkerPos "vipspawn" select 0), (getMarkerPos "vipspawn" select 1), 500];
_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle; 
[(leader (_Su34veh select 2)), "patrol_all","spawned","delete:",200] execVM "scripts\upsmon.sqf";

Share this post


Link to post
Share on other sites
Spawn it in the air. :)

setPosATL

_Su34veh = [getMarkerPos "vipspawn", (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;
(_Su34veh select 0) setPosATL [(getPosATL (_Su34veh select 0) select 0), (getPosATL (_Su34veh select 0) select 1), 200];

or:

_SpawnPos = [(getMarkerPos "vipspawn" select 0), (getMarkerPos "vipspawn" select 1), 200];
_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;

So does that still just spawn an empty plane, then you have to spawn a pilot and move him in as driver then ?

Share this post


Link to post
Share on other sites
Nope, that's not correct. According to this the return values are these:

_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle;

_Plane = _Su34veh select 0;

_Crew = _Su34veh select 1;

_Group = _Su34veh select 2;

Since UPSMON has to be executed on the group leader, it has to look like this:

_SpawnPos = [(getMarkerPos "vipspawn" select 0), (getMarkerPos "vipspawn" select 1), 500];
_Su34veh = [_SpawnPos, (random 360), "Su34", EAST] call BIS_fnc_spawnVehicle; 
[(leader (_Su34veh select 2)), "patrol_all","spawned","delete:",200] execVM "scripts\upsmon.sqf";

AHhhh thanks will give that a go now !

@ Koni No it spawns a plane with Crew allread in

Share this post


Link to post
Share on other sites

So the crew need to be assigned a waypoint then for it not to fall out of the sky ?

Share this post


Link to post
Share on other sites

Well i am using UPSMON that sets the patrol to a marker which i have made over the whole map , that way it wil fly around eveywhere so it will be random more fun :)

Share this post


Link to post
Share on other sites

If the plane spawns empty, you most likely have no center. You need at least 1 unit on the map, on the same side as the pane. Or use createCenter

Share this post


Link to post
Share on other sites

Ahh, school boy error, heh :)

As a matter of course I always place a unit from each side in no mans land at the start of any mission im making, but just did empty map when testing this spawn plane :)

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  

×