anders@dac.se 0 Posted July 16, 2002 I'm using the knowsabout command in a script.. If anyone in the group knowsabout a unit >3 then something happens.. i want every man in teh group to trigger this event.. do i really need to test the event for each man i the griup.. cant i just test the entire group if they knows about.. like it is know: ?(Ops1 knowsabout Scud1 > 3) : goto "ScudFound" ?(Ops2 knowsabout Scud1 > 3) : goto "ScudFound" ?(Ops3 knowsabout Scud1 > 3) : goto "ScudFound" ?(Ops4 knowsabout Scud1 > 3) : goto "ScudFound" cant you do something like this ?(Goup1 knowsabout Scud1 > 3) : goto "ScudFound" i tried to make an array witrh all the names Group1 = [Ops1, Ops2, Ops3, Ops4] it didnt work.. Is there anyway Share this post Link to post Share on other sites
=BFP=Cheetah 0 Posted July 16, 2002 maybe: Alpha = group this in the leaders' condition field and in the script: ?(Alpha knowsabout > 3) : goto "ScudFound" i don't know if it works Share this post Link to post Share on other sites
bn880 5 Posted July 16, 2002 From the command reference unit knowsAbout target Operand types: unit: Object or Group target: Object Type of returned value: Number Description: Check if (and how much) knows unit about target. If unit is vehicle, vehicle commander is considered. Example: soldierOne knowsAbout jeepOne This would suggest you can specify the entire group ie: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">@((Group Ops1) knowsabout Scud1 > 3) (someone knows code here)<span id='postcolor'> Share this post Link to post Share on other sites
anders@dac.se 0 Posted July 17, 2002 it works with the group command. but if the group commander is killed along the way, it does not work... can you get around this? Share this post Link to post Share on other sites
Whargod 0 Posted August 10, 2002 I have tried the same thing, but I always get errors. It says: Error type group, expected object I used the code posted by bn880, can anyone think of why it fails? I'm using patch 1.46, no Resistance addon. Thanks! Share this post Link to post Share on other sites
Whargod 0 Posted August 10, 2002 Something I just found out, in my trigger, if I write it like this: (leader FuelBaseGrp) KnowsAbout plyr > 0 It works this way, and I don't really see any problem with it. Does anyone know how/if this works properly? Share this post Link to post Share on other sites
Chris Death 0 Posted August 10, 2002 Also would work: "_x knowsabout scud1 > 3" count (units your_group) > 0 In a triggers condition field, and exec the scud found sqs from the activation field. This would mean, if one more then 0 men of that group hit the knowsabout > 3, it becomes active. ~S~ CD Share this post Link to post Share on other sites
bn880 5 Posted August 10, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (DV Chris Death @ Aug. 09 2002,22:13)</td></tr><tr><td id="QUOTE">Also would work: "_x knowsabout scud1 > 3" count (units your_group) > 0 In a triggers condition field, and exec the scud found sqs from the activation field. This would mean, if one more then 0 men of that group hit the knowsabout > 3, it becomes active. ~S~ CD<span id='postcolor'> Ye, that's the ticket. Wasn't this thread pretty old? I guess this guy still has a problem. Share this post Link to post Share on other sites
Whargod 0 Posted August 10, 2002 Actually I'm just learning, I'm pretty new to scripting in this game. I found something else out, maybe you can tell me why this is. In the init field of a group leader, I put "DoStop _x" ForEach (units group FuelBaseGrp) so they wouldn't go anywhere, but if I use "_x stop false" ForEach (units FuelBaseGrp) they never move. Only if I told them to stop using the "_x stop true" ... command will the other command work. Personally I thought stop was stop, and if you want them to move again just toggle the flag. Apparently this isn't so. Am I missing something? Thanks for the help! Share this post Link to post Share on other sites