themoffster 0 Posted April 4, 2002 1: How can I get a unit to join my group? I`ve looked at the unofficial command reference and tried what it says, but I get errors. I`ve tried this so far: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop ? (player distance helo1 < 5): goto "join" ~1 goto "loop" #join c5 Join GrpNull c6 Join GrpNull helo1driver join GrpNull ~1 c5 Join "moffgroup" c6 Join "moffgroup" helo1driver Join "moffgroup" ~0.5 this remooveaction "Put out fire" exit<span id='postcolor'> Where c5, c6 and helo1driver are the units I want to join moffgroup (I tried without the "" around moffgroup also) 2: From the same script above I tried to use the "removeaction" command. This gives an error also, now I know it isn`t in the same Command Reference Document, but I once upon a time used "AddAction" to add things where it says "Engine on, reload etc", I was thinking RemoveAction might be the opposite. I have fires hidden in a crashed BlackHawk to simulate it being on fire, but when I go near the chopper my action menu fills with "Put out fire", it looks silly. Any ideas? Share this post Link to post Share on other sites
themoffster 0 Posted April 4, 2002 I`ve found out that you do "unitname removeaction 0", this removes the action with index = 0. But how do I see what number corresponds to which index value? Share this post Link to post Share on other sites
Dawdler 0 Posted April 4, 2002 When using join, it dont take a string. You use something like: Plgroup = group player Man1 join Plgroup And I dont think you can remove actions created by the engine. Either way, that doesnt take a string, so it wouldnt work anyway. Share this post Link to post Share on other sites
Rastavovich 0 Posted April 4, 2002 Try: [c1] join grpnull [c1] join moffgroup The commands awaits an array so you have to place the brackets. Share this post Link to post Share on other sites
Bart.Jan 0 Posted April 4, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (themoffster @ April 04 2002,05<!--emo&:0)</td></tr><tr><td id="QUOTE">I`ve found out that you do "unitname removeaction 0", this removes the action with index = 0. But how do I see what number corresponds to which index value?<span id='postcolor'> This is from official scripting reference : unit addAction action Operand types:   unit: Object   action: Array Compatibility:   Version 1.1 required. Type of returned value:   None Description:   Create an action. Action ID should be returned, but due to bug it is not. To determine action ID use following algorithm: first action added to given vehicle has ID zero, next has ID one, etc. Example:   player addAction ["Hello", "hello.sqs"] Share this post Link to post Share on other sites