Chalk2 10 Posted April 14, 2010 Hi, i want to create the following situation: a player walks up to a civilian and ask him something, hell respond by pulling his pistol out and open fire at the player. I have everything working till the point where the guy is supposed to open fire at the player and/or the players mates. Does anybody know how to set a former friendly unit hostile towards the players side, or any other method archieving similar results? Thanks. Share this post Link to post Share on other sites
imutep 0 Posted April 14, 2010 maybe use the setFirend command. Be aware that this command only sets the friendliness of one side. If you want to have both sides attacking each other, you have to set both: WEST setFriend [Civilian, 0]; Civilian setFriend [WEST, 0]; But i think it's enough when you set "Resistance is friendly to OPFOR" in the editor. When the civilian has a weapon, he will fire to all units on side west. A civilian with a weapon is then a resistance unit. ;) Share this post Link to post Share on other sites
Junker 0 Posted April 14, 2010 set rating -10000 can be used.. Share this post Link to post Share on other sites
Chalk2 10 Posted April 14, 2010 (edited) @Imutep i want to stay away from setFriend cause: Intended to be used on mission start. Changing value during mission can cause unexpected errors in AI behavior. Im gonna think through the Resistance idea, mabye do a addWeapon/addMagazines during the conversation and see what happens, i got to sleep now, will check tomorow about it. @Junker could you point me to a wiki entry for "set rating" or post a syntax example on how to use it? Edited April 14, 2010 by Chalk2 Share this post Link to post Share on other sites
loyalguard 15 Posted April 14, 2010 The command name is: addRating Example: player addRating -10000; Share this post Link to post Share on other sites
Chalk2 10 Posted April 17, 2010 I tryed the Resistance Idea and addRating, unfortunaly the Civilian still wont attack the player. Guess i have to do this differently. Share this post Link to post Share on other sites
Coyota 10 Posted April 17, 2010 Use opfor armed civilians or make civilian as opfor. Remove weapons and set him as captive. When he needs to go bonkers add mag, gun and set him back to enemy. Share this post Link to post Share on other sites
Chalk2 10 Posted April 19, 2010 His is how i solved it: Dummy = createGroup civilian; "worker3" createUnit [getMarkerPos "unit", Bomber, "unitDummy = this"]; when needs to freak: DummiEast = createGroup east; [unitDummy] join DummiEast; unitDummy addWeapon "..."; unitDummy addMagazine "..."; Share this post Link to post Share on other sites