Rough Knight 9 Posted February 20, 2008 Hi guys, I am trying to make sure an insertion Helo drops off all my squad when height is less than 2m ASL. in the helicopters init field I have <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getPosASL=t1height Then in the condition field of the trigger I have <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">t1height < 2 I cant work out how to reference the helicopter into the code. I assume it should be incorporated into the helicopters init code somehow. I tried a few variations according to the WIKI suggestions but it usually says " missing ;". I tried a few combinations like with no luck. Where "transport1" is my Helo in question. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">getPosASL transport1=t1height Could anyone possible offer a suggestion. My problem is I added my squad to the helicopter "transport1" by using the following code. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveInCargo transport1} forEach units group htl2 When I get to the LZ however, the helo's unload transport waypoint only unloads me, it keeps the squad in the helo. The Helo then hovers until I order my crew to disembark before flying off to its next waypoint. I would prefer to use the getposASL function as a learning experience, but also is there another option to make my whole crew disembark? Thanks in advance. Frosty Share this post Link to post Share on other sites
fasad 1 Posted February 20, 2008 getPosASL=t1height is incorrect in a two ways - variable to be declared should be before the = sign. getPosASL requires a parameter. Correct syntax would be t1Height = getPosASL myChopper. getPos is probably more suitable for your use too, unless you are being dropped off over the beach or ocean. t1height < 2 is a valid condition, but in ArmA variables are not "live" (i assume there is some technical term for this). If you declare t1Height in the mission initialisation, then it will stay at that value forever unless you overwrite it. Share this post Link to post Share on other sites
Heatseeker 0 Posted February 20, 2008 I bet this has something to do with the helicopter hovering high while disembarking cargo and you and your soldiers getting injured? . For the last part you could try ejecting the troops with a small script. http://community.bistudio.com/wiki/action Name every single one of you men and the chopper and use a small delay betwean each ejection . Share this post Link to post Share on other sites
Rough Knight 9 Posted February 21, 2008 Thanks for the replies. My main issue was that when the squad leader of the Chopper cargo is set to "player", the "unload Transport" waypoint only ejects the leader rather than the whole squad even though they should still be classed as cargo:crazy:. I use this code on the squad leaders init field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x moveInCargo transport1} forEach units group htl2 The Helo then flys up to my "flyinHeight" and waits for me to order my squad to dis-embark. Once I give that order to my squad the Helo then drops down to ground level for them to disembark before flying off to its next waypoint. The only problem is that when it is at my "flyinHeight" the Helo is suseptable to my strategically placed "Shilka" nearby. If the chopper was to unload all my crew then fly off straight away, the insertion is too fast for the Shilka to react. Perhaps this is how it's supposed to be (squad not ejecting on unload trasport waypoint), as otherwise your squad is doing something you havent commanded it to. Thanks again Frosty. Share this post Link to post Share on other sites