bogart 10 Posted May 26, 2013 (edited) Hi, I would like to release a nice mission I made but I have to resolve this issue before: In this mission The AI US infantry squad patrol a road, before arriving to a village, after 2 waypoints on the hill we could encounter some takibans, when the us group spots them we engage, here the US AI team leader remains for a while when he decides to move to the next waypoints even though takibans are not dead... maybe a script in a trigger synced with the choosen stop move waypoint where says that "if Group doesn't spot enemies in that trigger they proceed to the next waypoint" I tried to put a trigger with "on activation: opfor" and "no present" but the Group will wait to the synced waypoint till they won't see any enemies... does this http://community.bistudio.com/wiki/knowsAbout could do the trick? thanks Matt Edited May 26, 2013 by Bogart Share this post Link to post Share on other sites
Joe98 92 Posted May 27, 2013 Set a trigger area that fires when there are no enemies in that trigger area Synch that trigger with waypoint 2. After you complete waypoint 1, you cannot proceed to waypoint 2 till the trigger has fired. Share this post Link to post Share on other sites
bogart 10 Posted May 27, 2013 (edited) that's what I've done, it doesn't work as they remain on the waypoint knowing the enemy is still alive even though they don't see him. I need a script for these situations: 1 - if no enemies are spotted, even they are present on the map, the group will move to the next waypoint. 2 - otherwise if the enemies are spotted they engage till all enemies are dead. thanks Set a trigger area that fires when there are no enemies in that trigger areaSynch that trigger with waypoint 2. After you complete waypoint 1, you cannot proceed to waypoint 2 till the trigger has fired. Edited June 10, 2013 by Bogart Share this post Link to post Share on other sites
bogart 10 Posted June 10, 2013 does anyone know how to do it? Share this post Link to post Share on other sites
Rydygier 1325 Posted June 10, 2013 If this is about spotting based on "knowsAbout" factor, try as condition (isNull (GroupLeader findNearestEnemy GroupLeader)) Where "GroupLeader" is a leader of the patrol group (or any memebr of that group in fact). If true - GroupLeader unit do not knows anything about any enemy. However, if this is strictly about spotting, means if enemy is actually visible, there will be needed LOS check between eyepos of each member of that group and each of takibans, if there is any terrain or object LOS obstruction. Also perhaps first direction check, if observer acually is looking at that direction. Such script can be heavy, so shouldn't be looped without any sleep. But, if patrol knows about any enemy nearby, may prove very difficult to convince it to continue its movement towards waypoint even, if enemy is not visible. Share this post Link to post Share on other sites
bogart 10 Posted June 11, 2013 (edited) Great! it works really well, now I can release my mission :) I didn't find anything about it, do you perhaps know how to create a trigger zone where AI can't hear gunshots? I have 2 enemy groups, about 500 meters away from each other, I want that the second one doesn't engage me when I'm fighting with the first one. The extended AI engagement ranges is caused by Zeus AI but I don't want to remove it as it makes the game really realistic. thanks If this is about spotting based on "knowsAbout" factor, try as condition(isNull (GroupLeader findNearestEnemy GroupLeader)) Where "GroupLeader" is a leader of the patrol group (or any memebr of that group in fact). If true - GroupLeader unit do not knows anything about any enemy. However, if this is strictly about spotting, means if enemy is actually visible, there will be needed LOS check between eyepos of each member of that group and each of takibans, if there is any terrain or object LOS obstruction. Also perhaps first direction check, if observer acually is looking at that direction. Such script can be heavy, so shouldn't be looped without any sleep. But, if patrol knows about any enemy nearby, may prove very difficult to convince it to continue its movement towards waypoint even, if enemy is not visible. Edited June 11, 2013 by Bogart Share this post Link to post Share on other sites
Rydygier 1325 Posted June 11, 2013 (edited) how to create a trigger zone where AI can't hear gunshots?I have 2 enemy groups, about 500 meters away from each other, I want that the second one doesn't engage me when I'm fighting with the first one. Nope, do not know nothing, that would make an AI deaf. There is only setSkill command for reducing spotting abilities, but this simply is not sufficient (works only in certain limits). Maybe perhaps some weird methods involving custom soldiers addon with changed config. But there are perhaps other ways to achieve not engaging AI: 1. You can reduce viewDistance below 500 meters (it is possible regardless of description), as AI should momentarily "forget" about anything and anyone outside view radius. But this of course will affect visuals; 2. You can spawn/displace that group here from other area only after the fight; 3. You can temporarily freeze all members of that group and make it invisible; 4. You can make each member of that group a captive temporarily; 5. You can prevent shooting via setCombatMode "BLUE" and any movement via forceSpeed 0 for units of that group. Methods can be more (disableAI command, removing ammo/weapons...). I suggest to use the easiest to you, that will fit your needs and situation. Note however, that we do not know, if/how Zeus AI addon may/will affect any of these methods. Edited June 11, 2013 by Rydygier Share this post Link to post Share on other sites
bogart 10 Posted June 11, 2013 (edited) thanks for your exhaustive answer, one of them should work surely I managed with the fourth case: in Blufor put: soldier1 setCaptive true and in a trigger: if ((soldier1 distance warlord) < 10) then {soldier1 setCaptive false} Nope, do not know nothing, that would make an AI deaf. There is only setSkill command for reducing spotting abilities, but this simply is not sufficient (works only in certain limits). Maybe perhaps some weird methods involving custom soldiers addon with changed config. But there are perhaps other ways to achieve not engaging AI:1. You can reduce viewDistance below 500 meters (it is possible regardless of description), as AI should momentarily "forget" about anything and anyone outside view radius. But this of course will affect visuals; 2. You can spawn/displace that group here from other area only after the fight; 3. You can temporarily freeze all members of that group and make it invisible; 4. You can make each member of that group a captive temporarily; 5. You can prevent shooting via setCombatMode "BLUE" and any movement via forceSpeed 0 for units of that group. Methods can be more (disableAI command, removing ammo/weapons...). I suggest to use the easiest to you, that will fit your needs and situation. Note however, that we do not know, if/how Zeus AI addon may/will affect any of these methods. Edited June 11, 2013 by Bogart Share this post Link to post Share on other sites