EBass 0 Posted July 29, 2009 I've done a search but came up blank. Essentially I'm looking for the command to switch a units side. So for example, when a waypoint or a trigger becomes active a unit, a civilian in my mission, switches sides to Blufor, with all that that entails (will target OPFOR and appears hostile to them.) Cheers. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 It's not possible to dynamically change a unit's side. You could try swapping the unit itself. Share this post Link to post Share on other sites
mrn 0 Posted July 29, 2009 You could use setcaptive instead...http://community.bistudio.com/wiki/setCaptive Group your Civ to a Blufor dude with a presence of 0 and set your civ to setcaptive true then on your trigger use setcaptive false. Maybe... Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 It's not possible to dynamically change a unit's side. You could try swapping the unit itself. That surprises me greatly, I mean when you fire on your own team and then eventually they shoot you I figured that after a certain amount of friendly fire they just set your status to OPFOR or "Independant, friendly to nobody." Urgh, well this is gonna cause some problems, how would I go about dynamically swapping the unit itself? (bear in mind obviously the unit must look the same etc) Share this post Link to post Share on other sites
mrn 0 Posted July 29, 2009 when you fire on your own team and then eventually they shoot you I figured that after a certain amount of friendly fire they just set your status to OPFOR or "Independant, friendly to nobody." That's to do with your Rating, depends what you're trying to achieve but unit addrating -10000 would make him pretty unpopular. Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 Ok in that case is it possible to force a units appearance (so the unit is actually say Russia Rifleman, but LOOKS like civilian policeman) Share this post Link to post Share on other sites
mrn 0 Posted July 29, 2009 Ok in that case is it possible to force a units appearance (so the unit is actually say Russia Rifleman, but LOOKS like civilian policeman) Not that I'm aware of. If you can get away with a cheeky black out titletext could you swap the unit with another one? Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 What I'm trying to do is 2 things. Firstly, I have two policemen in the town I want when they detect me to go hostile to me and alternativly to have my squad go hostile to them. Also I've got an assasination target who I want to run away and if he gets away he arms himself with an AK (already done that) and becomes hostile to my squad. Share this post Link to post Share on other sites
mrn 0 Posted July 29, 2009 How about the setfriend command? http://community.bistudio.com/wiki/setFriend Haven't tried it in ArmaII yet and reading the notes be wary of using it with civilians but it may help? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 Just use setCaptive on everyone. Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 Could you extend that answer a little please? How will making all my units neutral to everyone help? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 Make the cops OPFOR, yoru squad BLUFOR, and the target Independent. Set them all captive at mission start. When the cops detect you use setCaptive false on both your squad and the cops. When the target picks up a weapon use setCaptive false on him. Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 (edited) How am I going to make the cops OPFOR if I can't force them to have a civilian skin?. Also Captive units don't set of the "detected by" trigger. Edited July 29, 2009 by EBass Share this post Link to post Share on other sites
jakerod 254 Posted July 29, 2009 You can group the civilians to an opfor soldier and set his probability of presence to 0. This will make the civilians opfor but there will be no opfor soldier with them. Does anyone know if using the join command to join them with an opfor on the other side of the island and then deleting him will make them opfor? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 You can put any unit on any side at the start of the mission either by "hacking" the SQM, or grouping them to a unit (who must be leader) of that side (and you can set his prob of presence to 0 so he won't spawn). You can get triggers to detect captive units if you set them to ANYBODY, and then you can check in the condition what side the units are on. Ex: For BLUFOR detected by OPFOR, create trigger as such: Anybody Detected by OPFOR Condition: {side _X == "west"} count thislist > 0 Although I would advise you not to use side as a condition anyway. Just see if your squad was detected: Anybody Detected by OPFOR Condition: {group _X == group player} count thislist > 0 Share this post Link to post Share on other sites
mrn 0 Posted July 29, 2009 Like this Move to the waypoint and the officer should shoot at you Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 Ok I've found an easier way round it. However one final question, how can I make it so a trigger fires if a group member is detected by a particular individual, not a side as a whole? So any group member detected by "Cop1" etc. Thanks for all the help guys. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 In the condition of the detected by trigger you can try this: {cop1 knowsAbout _X >= 1} count thislist > 0 Or for multiple units, for example an array of units allCops: {thiscop = _X; {thiscop knowsAbout _X >= 1} count thislist > 0} count allCops > 0 Edit: :j: Nested count statements turn me on... is that odd? Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 Whats all this count thislist? I'm afraid I don't understand a word of it. Anyhow, it doesen't seem to work for me. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 29, 2009 This one should work: {cop1 knowsAbout _X >= 1} count thislist > 0 For a unit named cop1. If not try adjusting the knowsAbout value. Thislist returns an array of units "picked up" by the trigger (in this case all BLUFOR in the trigger area that are detected by OPFOR). Share this post Link to post Share on other sites
EBass 0 Posted July 29, 2009 That worked, though I needed to adjust the knowsaboutvaule down to 0.1 to get the desired effect, cheers. Share this post Link to post Share on other sites