Cloughy 0 Posted April 22, 2007 Can i use the knowsAbout command for any unit in a group rather than a particular unit. I know it can be used commie KnowsAbout player > 0.5, but can it be used with commie knowsAbout units group player or something similar? or would i have to script this? Cheers GC Share this post Link to post Share on other sites
fasad 1 Posted April 22, 2007 knowsAbout The target must be an object, not a group. However the "knower" can be a unit or group. Since groups use one brain it makes no difference. You'll have to script something, you can use forEach units group but forEach executes in one frame, which can cause slowdown. The rest of the script depends on what you want to know/do with the information. Share this post Link to post Share on other sites
Cloughy 0 Posted April 22, 2007 If they are known about, i just want to activate a trigger, that fires up a searchlight script. Cheers GC Share this post Link to post Share on other sites
fasad 1 Posted April 22, 2007 So the specific searchlight should shine on any enemy unit it knows about? This is not a cut and paste solution, but it should give you an idea of what's needed: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {if ((searchLight knowsAbout _x) > 0.1) then {[_x,searchLight] exec "spotLight.sqs"; exit}} forEach (units group01) If you don't need the searchlight specifically to knowAbout the enemy (remember AI does not pass information between groups!), you could easily use a detected by trigger with a counter to slow down the activation to simulate the knowledge being passed to the searchlight. eg: BLUFOR detected by OPFOR countDown 2 10 7 Share this post Link to post Share on other sites
Cloughy 0 Posted May 2, 2007 I activate the trigger with the following command <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ({unit knowsAbout _x >0.5} count units group2 > 1) Cheers GC Share this post Link to post Share on other sites