_grumpy 0 Posted April 6, 2007 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
shuko 59 Posted April 6, 2007 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
Mr_Tea 0 Posted April 6, 2007 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
shuko 59 Posted April 6, 2007 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
_grumpy 0 Posted April 6, 2007 ok I've tried setting the units to In Cargo, and I've ensured the leader is there 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
Heatseeker 0 Posted April 6, 2007 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
shuko 59 Posted April 6, 2007 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
doc_no1 0 Posted April 6, 2007 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
_grumpy 0 Posted April 6, 2007 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 Share this post Link to post Share on other sites