Jump to content

Sign in to follow this  
JoeyNickel

assignAsCargo und orderGetIn vs. moveInCargo

Recommended Posts

Hi,

I'm trying to have group of soldiers board a vehicle (truck, heli.....). Usually I would name the vehicle (here "UH1"), create a group and name the leader (here "leader1") and have it board the vehicle in an animated way via GroupLeaders init line:

gruppe1=group this; {_x assignascargo UH1} foreach units group this; {_x ordergetin "true"} foreach units group this;

It doesn't work. I also tried to manually add the single members of the group via join, also not possible.

The only thing that works (but looks horrible) is to use moveInCargo. My teams are beamed inside the vehicle, I can let it fly around, let it fly low at 2 meters, have it drop the cargo (other words: the team disembarks), let the copter land and turn the engine of. Works all great, except for the animation.

A single soldier could walk to the helicopter via waypoint (btw.... moveTo getPos UH1 won't work as well) and then beam him in...... but a team of six guys...... that looks odd.

Anybody a solution for this?

Share this post


Link to post
Share on other sites

Try this:

gruppe1=group this; {_x assignAsCargo UH1} foreach units gruppe1; {_x orderGetIn true} foreach units gruppe1;

Alternately you could use allowGetIn instead of orderGetIn, should work aswell.

http://www.arma2.com/comref/full.html#ArrayorderGetInBoolean

unitArray: Array

order: Boolean

An boolean is not put in quotes: You used "true", it should be true

Edited by Tajin

Share this post


Link to post
Share on other sites

_group addvehicle vehiclename works wonders i find - none of that assignthis moveinthat and stuff and when u want them to get out - use _group leavevehicle vehiclename..

Share this post


Link to post
Share on other sites
  Junker said:
_group addvehicle vehiclename works wonders i find - none of that assignthis moveinthat and stuff and when u want them to get out - use _group leavevehicle vehiclename..

Oh, didnt' know that one. I think I know someone who'll be happy to hear about that. :p

Share this post


Link to post
Share on other sites

I'll test it, but I doubt that's what I seek (even it might be better than moveInCargo). The good thing assigning units to a vehicle is, that you can specify where one will have to go, and only concentrate on waypoints for this unit they really need.

But hey, let's see....... thanks anways :)

-edit: tested, doesn't work. with addvehicle.

Edited by JoeyNickel

Share this post


Link to post
Share on other sites

How can I assign these commands to a AI Unit which has respawned in MP?

I still dont find a way how I can tell respawned units what to do?

Share this post


Link to post
Share on other sites

Name your vehicle,place a squad with a "Get In" waypoint to lets say the chopper named H1 , name each unit in your squad and put in the leaders init line,

U1 assignAsCargo H1; U2 assignAsCargo H1;  U3 assignAsCargo H1; U4 assignAsCargo H1;

I can't get forEach blah blah to work for assignAsCargo.The entry in the wiki says

  Quote
Before usage of this command a subordinate unit hasn't got the option to get into the cargo space of the vehicle.[/Quote] I think reading between the lines the wiki means that you have to assign each unit to the vehicle individually can anyone confirm this? The only thing I can find to move a group in to a vehicle is this
 "_group moveincargo boat1" 
[/Code]

I just tried

[Code] _group=group _unit; _group addVehicle _vehicle;_group moveInCargo _vehicle;[/Code]

which also works (annimated) with

[Code] _group leave _vehicle;[/Code]

But this does mean that the crew get out to, which is OK for boats or APC's and such if you want everybody out but not choppers as usually you want the crew to stay in the chopper, plus the squad head back to the airfield or where they got in. So therefore I think assignAsCargo and unassignVehicle better for choppers.

Edited by Padjur
tried addVehicle

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  

×