dbeaty2 10 Posted June 10, 2014 I am building a mission with BLUFOR and OPFOR in a cease fire. BLUFOR is Mplayers, OPFOR AI. My goal is to have BLUFOR approach OPFOR, ROE is do not shoot OPFOR. OPFOR has the same ROE. But a player may make a mistake and shoot OPFOR, thus causing OPFOR to fire back breaking the cease fire. "Don't fire unless fired upon logic" Combat Modes sort of work. NEVER fire works and OPFOR can be gunned down without them defending or returning fire. They just fall over. HOLD fire does not work, if armed BLUFOR approaches OPFOR which is in HOLD mode, OPFOR will engage. I tested that one. I need to figure out how to create a script or triggered module to switch from Never Fire to Hold Fire or Fire only when BLUFOR fires on OPFOR. I was thinking what kind of trigger would detect that? Perhaps code that detects if OPFOR is damaged or takes hits? Not sure how to do that. Anyone think of the trigger to detect this or another clever logic? Share this post Link to post Share on other sites
SilentSpike 84 Posted June 10, 2014 My advice would be to use this to set/unset the two factions as friendly: https://community.bistudio.com/wiki/setFriend Share this post Link to post Share on other sites
dbeaty2 10 Posted June 16, 2014 I think I have it figured out using the SetMode modules and triggers using a "Damage" as condition. But need some help with making it consider the groups versus units. Since I don't know how to do groups I have to create a trigger and a setMode for every unit. It works but is clunky. This is what I do. Place an OPFOR Fire Team. They are to not fire unless fired upon. The OPFOR are AI the BLUFOR are players. So, I add a Module to setMode NEVER FIRE synced to each OPFOR. BLUFOR can walk right up and OPFOR aims their guns but does not fire.... OK next I add a trigger for OPFOR present and a condition of: damage unit1 >0.1; and sync this to a new Module with setMode FIRE synced to an OPFOR who I name unit1. Repeat for all OPFOR units. So one trigger for each AI and one setMode for each unit. The triggers look at every OPFOR unit continuously checking damage. it does work and now when BLUFOR shoots an OPFOR with this script first, the damage is seen in the trigger which touches off the FIRE mode and OPFOR opens up. But I wish I knew scripting enough to have only one trigger, and two setModes that look at all OPFOR troops, considering damage on any one of them. The condition code only works with a unit name. I can't figure out how to make OPFOR a group and then have the damage code look at the group's damage. Tried everything I can think of. I just don't know the scripting well enough. Share this post Link to post Share on other sites