Jump to content
Sign in to follow this  
avibird 1

help with moveInGunner for M1128_MGS_EP1 not working Help please!

Recommended Posts

Hello does anyone know the correct code to get a gunner in the M1128_MGS_EP1

My code below.

Mec6 = createVehicle ["M1128_MGS_EP1", [(getpos player) select 0,(getpos player) select 1,0], [], 1000, "FORM"];

Mec6c1 = GroupMechanized createUnit ["US_Soldier_Crew_EP1", [0,0,1], [], 0, "CAN_COLLIDE"];

Mec6c1 moveInDriver Mec6;

Mec6c2 = GroupMechanized createUnit ["US_Soldier_LAT_EP1", [0,0,2], [], 0, "CAN_COLLIDE"];

Mec6c2 moveInGunner Mec6;

here is info on the unit only has two position.

Class = M1128_MGS_EP1

Name = Stryker MGS

Faction = BIS_US

Side = WEST

Positions = 2

Info

The Stryker Infantry Combat Vehicle was designed to be highly mobile and air-transportable by C-130. The basic armor package is capable of withstanding 14.5mm heavy machine gun fire, but with the crew-installable add-on armor kit (which adds significantly to the vehicle�s weight), it is also capable of surviving a hit from an RPG-7 rocket propelled grenade. The Infantry Combat Vehicle provides transport and fire support for a 9 man squad. There are also Command (CV), Mortar (MCV-B), Anti-Tank (ATGM) and Medical Evacuation (MEV) variants.

Weapon Class(1) = M68

Weapon Class(2) = M2

Weapon Class(3) = SmokeLauncher

Magazine Class(1) = 6RND_105mm_APDS

Magazine Class(2) = 12Rnd_105mm_HESH

Magazine Class(3) = 100Rnd_127x99_M2

Magazine Class(4) = SmokeLauncherMag

I can only get a drive I have used different numbers [0,0,3], [0,0,4], [0,2,0], but no luck. Any help would be great thanks Avibird.

Share this post


Link to post
Share on other sites

createUnit array doesn't support "CAN_COLLIDE" and it seems unnecessary since CAN_COLLIDE simply tells the object to ignore other objects so you can eg. spawn it inside a rock. I'll take a look at the Stryker, but moveInGunner should work. Try "NONE" as special property.

//Edit:

Use "MoveInCommander" instead. The gunner position is the commander since there are only 2 seats in the MGS.

Edited by tryteyker

Share this post


Link to post
Share on other sites

The CAN_COLLIDE works fine for me with all the other Strykers this is how I learned to write the code however I think it's a game glitch because in the Mechanized group of Strykers the M1128_MGS_EP1 is the only one that does not work ): no gunner with spawn in only the driver.

Share this post


Link to post
Share on other sites

You're using CAN_COLLIDE on units, and the purpose of CAN_COLLIDE is simply that the object ignores other objects, and that's kinda useless with units since as soon as they get stuck inside something they die. As for the pre-configured groups, I have no idea. About the Stryker MGS though, the gunner counts as commander, so you can't move anyone inside it with moveInGunner (only works with moveInCommander)

Share this post


Link to post
Share on other sites
createUnit array doesn't support "CAN_COLLIDE" and it seems unnecessary since CAN_COLLIDE simply tells the object to ignore other objects so you can eg. spawn it inside a rock. I'll take a look at the Stryker, but moveInGunner should work. Try "NONE" as special property.

//Edit:

Use "MoveInCommander" instead. The gunner position is the commander since there are only 2 seats in the MGS.

Does not work as well.

Share this post


Link to post
Share on other sites

Mind showing the part of code where you create the units and move them into the vehicle? If you're using MoveInCommander instead of MoveInGunner and that doesn't work there has to be something else, since this works, I've tested it myself.

Share this post


Link to post
Share on other sites

yes mate same as above code for M1128_MGS_EP1 with the MoveInCommander instead of MoveInGunner! If I put anyother Stryker with only two positions moveInDriver and movInGunner work fine. WTF LOL. I am a little no clue what to try next to make it work with the M1128_MGS_EP1

Mec6 = createVehicle ["M1128_MGS_EP1", [(getpos player) select 0,(getpos player) select 1,0], [], 1000, "FORM"];

Mec6c1 = GroupMechanized createUnit ["US_Soldier_Crew_EP1", [0,0,1], [], 0, "CAN_COLLIDE"];

Mec6c1 moveInDriver Mec6;

Mec6c2 = GroupMechanized createUnit ["US_Soldier_LAT_EP1", [0,0,2], [], 0, "CAN_COLLIDE"];

Mec6c2 MoveInCommander Mec6;

Share this post


Link to post
Share on other sites

Try this:

//create the vehicle
_mec6 = createVehicle ["M1128_MGS_EP1", [(getpos player) select 0,(getpos player) select 1,0], [], 1000, "FORM"];

//create a group
_mechGroup = Creategroup WEST;

//create the units
_crew =  "US_Soldier_Crew_EP1" createUnit [getPos _mec6, _mechGroup, "this moveindriver _mec6", 1, "Sergeant "];
_crew =  "US_Soldier_Crew_EP1" createUnit [getPos _mec6, _mechGroup, "this moveingunner _mec6",1, "Corporal"];

Or fiddle with moveInTurret

---------- Post added at 18:57 ---------- Previous post was at 18:55 ----------

Or just use BIS_fnc_spawnVehicle and forget the rest :cool:

_veh = [getPos mySpawnPos, random 360, "M1128_MGS_EP1", WEST] call bis_fnc_spawnvehicle;

Edited by Iceman77

Share this post


Link to post
Share on other sites

moveInDriver and moveInGunner both work with this. Funny thing is, I don't think you can place this one in the editor, as I'm not finding it in mine at least...maybe looking in the wrong spot, but it's not under Armoured Desert with the rest of the strykers. I had to create one via trigger and play around with moving myself in the driver and gunner seats. moveInCargo and moveInCommander don't work either

Share this post


Link to post
Share on other sites

As far as the cargo/commander is concerned, that particular stryker doesn't have any cargo spots (according to the cobaf cargo pdf guide) and I believe no commander slot aswell. Just driver/gunner

Edited by Iceman77

Share this post


Link to post
Share on other sites

I was testing this via editor. The Stryker MGS is in US -> Armored and then all the way down. moveInGunner didn't work, but moveInCommander did. AFAIK every vehicle with only 2 slots has the gunner as Commander, see for example HMMVV.

Share this post


Link to post
Share on other sites
I was testing this via editor. The Stryker MGS is in US -> Armored and then all the way down. moveInGunner didn't work, but moveInCommander did. AFAIK every vehicle with only 2 slots has the gunner as Commander, see for example HMMVV.

I don't believe that's the same one...M1128_MGS_EP1

If you create a radio trigger with:

Mec6 = createVehicle ["M1128_MGS_EP1", [(getpos player) select 0,(getpos player) select 1,0], [], 10, "FORM"];

Then another radio trigger with:

player moveInGunner Mec6;

It works fine.

Share this post


Link to post
Share on other sites

Weird, Arma 2 library says Stryker MGS and it's labeled Stryker MGS. But I also saw an MG mounted ontop of the one described in the library and the one in the editor doesn't have one, so it seems you're right. :S

Share this post


Link to post
Share on other sites
yes mate same as above code for M1128_MGS_EP1 with the MoveInCommander instead of MoveInGunner! If I put anyother Stryker with only two positions moveInDriver and movInGunner work fine. WTF LOL. I am a little no clue what to try next to make it work with the M1128_MGS_EP1

Mec6 = createVehicle ["M1128_MGS_EP1", [(getpos player) select 0,(getpos player) select 1,0], [], 1000, "FORM"];

Mec6c1 = GroupMechanized createUnit ["US_Soldier_Crew_EP1", [0,0,1], [], 0, "CAN_COLLIDE"];

Mec6c1 moveInDriver Mec6;

Mec6c2 = GroupMechanized createUnit ["US_Soldier_LAT_EP1", [0,0,2], [], 0, "CAN_COLLIDE"];

Mec6c2 MoveInCommander Mec6;

After a little break trying to get this to work the MoveInCommander WORKS for the M1128_MGS_EP1. I must of had an error or typo in my codeline. the M1128_MGS_EP1 is the only Stryker that uses the MoveInCommander and not the MoveInGunner command. Thanks for the help guys.

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  

×