Bouben 3 Posted June 22, 2012 Hi, I have a trigger that should be making a group from nearEntities found up to 50 meters. For testing I am using a single group of OPFOR soldiers all within reach of the trigger. units1 = (position trigger1) nearEntities 50; grp1 = group units1 However, script error reports that this part of code: grp1 = group units1 Type Array, expected Object What is wrong? Can't figure it out. Thank you. Share this post Link to post Share on other sites
Tajin 349 Posted June 22, 2012 That is wrong in so many ways... Why do you even want to use nearEntities when you take a trigger as reference? Just set your trigger conditions the way you need em and put this under activation: grp1 = createGroup east; thisList joinSilent grp; Share this post Link to post Share on other sites
Bouben 3 Posted June 22, 2012 In my scenario I need any OPFOR group (it is different everytime) passing through the trigger to become group named "grp1". Therefore I need nearObjects or nearEntities or something I don't know to make a group from random NPCs going through the trigger. Anyway, I am not quite sure if I understand what your code means. Could you please explain? Share this post Link to post Share on other sites
Muzzleflash 111 Posted June 22, 2012 Create the trigger OPFOR PRESENT and set it to REPEATABLE only if you want to set another group to grp1 if it enters after the first one and so on. This activation should do what you want. It finds any one of the men that entered the trigger and set grp1 to the the group that man is in. grp1 = group (thisList select 0); Share this post Link to post Share on other sites
Bouben 3 Posted June 22, 2012 Create the trigger OPFOR PRESENT and set it to REPEATABLE only if you want to set another group to grp1 if it enters after the first one and so on.This activation should do what you want. It finds any one of the men that entered the trigger and set grp1 to the the group that man is in. grp1 = group (thisList select 0); Thanks, will try. What is thisList command about and how does it work with select 0? Can not find it on BIS wiki. Share this post Link to post Share on other sites
f2k sel 164 Posted June 22, 2012 it just points to the first element in the array thislist. Share this post Link to post Share on other sites
Muzzleflash 111 Posted June 22, 2012 What is thisList command about and how does it work with select 0? Can not find it on BIS wiki. thisList is the objects that fulfill the triggers requirements. If you set it to OPFOR PRESENT then it an array of all the opfor units that are "activating" the trigger. 'select' pick items from the array with the very first item having the index 0. Second item 1. However, I use 0 cause I know that since the activation code is only run then the when is fulfilled there must be at least a single opfor unit inside the trigger (the 0 index). Share this post Link to post Share on other sites
Bouben 3 Posted June 23, 2012 Thank you! Will try it ASAP. Share this post Link to post Share on other sites