Jump to content
Sign in to follow this  
fleamo

Trying to spawn a chopper and pilot. getInDriver not working?

Recommended Posts

UPDATE: This works!

hint "Active";
pilotGroup = createGroup west;
helo1 = createVehicle ["O_Ka60_F",getMarkerPos "heloSpawn", [], 0, "FLY"];
helo1 engineOn true;
helo1 flyInHeight 20;
"B_Helipilot_F" createUnit [getMarkerPos "heloSpawn", pilotGroup,"pilot1 = this"];
pilot1 assignAsDriver helo1;
pilot1 moveInDriver helo1;

Original post below:

I've got two triggers set up.

One spawns a helo pilot (pilot1) and a chopper (helo1)

The second does this on activation:

hint "Move the pilot into the chopper";
pilot1 assignAsDriver helo1;
pilot1 moveInDriver helo1;

But it doesn't seem to work. I've tried a bunch of things, including using Action get in as driver. I can't even get him into the helo as cargo.

This should be simple. What am I doing wrong?

---------- Post added at 23:32 ---------- Previous post was at 23:21 ----------

Just occurred to me that I could be spawning the pilot incorrectly. I mean, he spawns, but...

pilot1 = "B_Helipilot_F" createVehicle (getMarkerPos "pilotSpawn"); 
helo1 = "O_Ka60_F" createVehicle (getMarkerPos "heloSpawn"); 

Does it matter if I spawn him as a vehicle? I tried createUnit, but couldn't get it to work.

Edited by fleamo

Share this post


Link to post
Share on other sites
I've got two triggers set up.

One spawns a helo pilot (pilot1) and a chopper (helo1)

The second does this on activation:

hint "Move the pilot into the chopper";
pilot1 assignAsDriver helo1;
pilot1 moveInDriver helo1;

But it doesn't seem to work. I've tried a bunch of things, including using Action get in as driver. I can't even get him into the helo as cargo.

This should be simple. What am I doing wrong?

---------- Post added at 23:32 ---------- Previous post was at 23:21 ----------

Just occurred to me that I could be spawning the pilot incorrectly. I mean, he spawns, but...

pilot1 = "B_Helipilot_F" createVehicle (getMarkerPos "pilotSpawn"); 
helo1 = "O_Ka60_F" createVehicle (getMarkerPos "heloSpawn"); 

Does it matter if I spawn him as a vehicle? I tried createUnit, but couldn't get it to work.

I'm doing the exact same thing, and I can't get it to work. I think you use createUnit.

Mine:

_heli = "O_Ka60_F" createVehicle (getMarkerPos "heli");
_heli engineOn true;
"B_Helipilot_F" createUnit [getMarkerPos "heli", _groupPilots,"pilot1 = this ;
pilot1 moveInDriver heli;

Share this post


Link to post
Share on other sites

Yep.. Had that problem as well.. Quit ArmA3, restart and it all works.

But just thinking.. could it be related to running ArmA3 Betas?

Share this post


Link to post
Share on other sites

nah this u need to assign the number which is the seat like this

this assignasturret [heli, [0]];

same for

this moveinturret [heli, [0]];

try that works i just tried it think i deleted it as im doing alot of scripting and such lo.

Share this post


Link to post
Share on other sites
nah this u need to assign the number which is the seat like this
this assignasturret [heli, [0]];

same for

this moveinturret [heli, [0]];

try that works i just tried it think i deleted it as im doing alot of scripting and such lo.

It doesn't seem to work.

Share this post


Link to post
Share on other sites

I've compiled everything into one trigger now. This works:

hint "Active";
pilotGroup = createGroup west;
helo1 = createVehicle ["O_Ka60_F",getMarkerPos "heloSpawn", [], 0, "FLY"];
helo1 engineOn true;
helo1 flyInHeight 20;
"B_Helipilot_F" createUnit [getMarkerPos "heloSpawn", pilotGroup,"pilot1 = this"];
pilot1 assignAsDriver helo1;
pilot1 moveInDriver helo1;

Units need to be added to an existing group, which is annoying. So, I also had to initialize a group.

Share this post


Link to post
Share on other sites
It doesn't seem to work.

put those both into the int feild of the unit and the unit will get inside helicopter see where i put heli you need to change that to the name of what your vehicle is called.

Share this post


Link to post
Share on other sites

Why not just try this?

_grp_heli = creategroup East;
_heliSpawn = [getMarkerPos "heloSpawn", 180, "O_Ka60_F", _grp_heli] call bis_fnc_spawnvehicle;
_heli = _heliSpawn select 0; //this is the vehicle itself
_heli flyinheight 20;

Edited by cobra4v320

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  

×