Jump to content
Sign in to follow this  
_grumpy

Problem with loading helicopters

Recommended Posts

Hi guys,

I'm using the following command to try and load a squad of troops onto a helicopter

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveinCargo BH1} forEach units this

the code is applied to the leader, and the helicopter is named BH1

From what I've read here this should make the squard start the mission inside the helicopter but it just doesn't seem to work.

The helicopter is in flight over the sea, and the squad is positioned on a nearby coastline, with the code applied.

Anyone got an inkling what I'm doing wrong?

Any help would be greatly appreciated. Sorry if there is a solution someplace, but I has searched and not found it :-(

R

Share this post


Link to post
Share on other sites

Code looks right.

Have you made sure the code is run? If the unit (leader) is not present at the start of the mission, its not run and nobody will be moved.

If theres not a lot of them in the group. You could just do it in each units init field:

this moveincargo BH1

And change the starting field to "In Cargo". This wont effect anything if they are players, but doesnt hurt either.

Share this post


Link to post
Share on other sites

It have to look like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveincargo taxi1} foreach units group this

Share this post


Link to post
Share on other sites
It have to look like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveincargo taxi1} foreach units group this

It works without the "group", I just doubled checked it in editor.

Share this post


Link to post
Share on other sites

ok I've tried setting the units to In Cargo, and I've ensured the leader is there smile_o.gif

I have the code in the 'initialization' field in the groups leader's info, and i've also tried by individual soldier

still not working!

i'm sure its gotta be something stupidly obvious i've missed :-(

could it be a problem with case? does the editor care if a command is moveincargo or moveinCargo?

Share this post


Link to post
Share on other sites

You forgot to group them? In officers init: mygroup = group this.

Dont use that way for MP if the soldiers are playable though.

Share this post


Link to post
Share on other sites

No, its not case sensitive. Can you upload the mission somewhere and Ill take a look.

Heatseeker, it works without that as well.

Share this post


Link to post
Share on other sites

maybe your usung a typo error by mistake? i tried this for you it works for me copy and paste it into leaders init line,make sure you def using a UH60 ps only trying to help ok good luck m8.

{_x moveincargo BH1} foreach units group this

Share this post


Link to post
Share on other sites

aha it works!

the only thing i know is different this time is the helicopter is attached to the unit (and so the squad and the helicopter share a leader)

thanks for the help guys smile_o.gif

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  

×