Jump to content
Sign in to follow this  
wraith_v

deleting helicopter gunners

Recommended Posts

Hello again, I am trying to delete the door gunners from a UH-1Z Venom Helicopter to make more room for my squad.

I can delete one of the door gunners - the one in the 'gunner' position, but I am having some trouble deleting the second gunner, the code i am using to delete one of the gunners is:

g1 = gunner helo1; 
g1 setpos [0,0,100]; 
deletevehicle g1;

I would have simply created an empty huey with 2 pilots but they ignore the 'transport unload' waypoint, i could also use a vehicle with more transport slots but i don't want to.

Share this post


Link to post
Share on other sites

making an empty huey with just two pilots should still work, though. If they are ignoring a "Transport Unload" waypoint try putting "this assignAsDriver helo1;" in one of their inits, and "this assignAsCargo helo1;" in the other.

Share this post


Link to post
Share on other sites
making an empty huey with just two pilots should still work, though. If they are ignoring a "Transport Unload" waypoint try putting "this assignAsDriver helo1;" in one of their inits, and "this assignAsCargo helo1;" in the other.

I put those values into the init fields of the pilots and it the helicopter just hovers above the invisible H.

http://community.bistudio.com/wiki/turretUnit

deleteVehicle (helo1 turretUnit [1])

This doesn't actually work, something to do with the crew in vehicles can't be deleted if they don't have a name. It should read:

aa3 = chin turretUnit [1];
aa3 setpos [0,0,200]; 
deletevehicle aa3;

Even then it only works on the they guy in the 'gunner' position it doesn't work on any other positions, i tried several other aircraft, including blackhawks and chinooks, it only deletes the guy in the 'gunner' position.

It's strange because the indexes are correct if you are using moveInTurret, but not with deleteVehicle :(

EDIT:In the end I swapped the Hueys with Seahawks, and now I can finally continue on with my mission

Thanks anyway though guys :)

Share this post


Link to post
Share on other sites

Try this, tested and working, could be cleaned up but this was just a quick test to see if it worked. Place the following in the init line of the huey. Huey name is h1.

g2 = h1 turretunit [1];

g1 = h1 turretunit [0];

g1 setpos [0,0,100];

moveout g2;

deletevehicle g1;

g2 setpos [0,0,100];

deletevehicle g2;

For some reason turret [1] position is limited in how you can manipulate the unit. You have to get him out first before you can delete the unit. Result is a huey with a pilot and co-pilot and no gunners. I imagine it works with other helicopters, but did not test it.

Update

Tried the CH47

For each gunnerposition you must give the moveout command in order to delete the unit. Therefor, before you setpos you must moveout to get it to function properly.

Example:

g1 = h1 turretunit [0]; moveout g1; g1 setpos [0,0,100]; deletevehicle g1;

g2 = h1 turretunit [1]; moveout g2; g2 setpos [0,0,100]; deletevehicle g2;

g3 = h1 turretunit [2]; moveout g3; g3 setpos [0,0,100]; deletevehicle g3;

Edited by pbishop
Adding information

Share this post


Link to post
Share on other sites

Hrm. Transport Unload waypoints also need to be synchronized to a "GET OUT" waypoint of the group they are unloading. Usually this waypoint would be placed right next to the invisible H, with the Transport Unload being placed directly on it.

There could be a bug you found of which I am not aware, however. I haven't done a lot of helo insertions since ArmA 1 ;p

Share this post


Link to post
Share on other sites

Not tested...but should work. Should delete everyone but the Pilot/Driver.

_crew = group _vehicle;

for [{_j=0},{_j<count units _crew},{_j=_j+1}] do {
_dude = units _crew select _j;
_rolearray = assignedVehicleRole _dude;
if ((_rolearray select 0) != "Driver") then {
	deleteVehicle _dude;
};
sleep 0.01;
};

Share this post


Link to post
Share on other sites
snip

Thanks pbishop! I changed the helicopters to UH-60s for this mission but your solution helped me with another mission I was having trouble with :D

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  

×