Jump to content
Sign in to follow this  
Xen0tech

How do I make civilian attack me?

Recommended Posts

I been trying out all sorts of things but can't seem to get it to happen. The scenario is I have 2 civilians that I armed with weapons and want them to see me as enemy, but no matter what I try they won't shoot at me. They do however shoot at Opfor which is what I don't want.

Share this post


Link to post
Share on other sites
I been trying out all sorts of things but can't seem to get it to happen. The scenario is I have 2 civilians that I armed with weapons and want them to see me as enemy, but no matter what I try they won't shoot at me. They do however shoot at Opfor which is what I don't want.

Put an enemy on the map, double click on it and set its probability of presence to 0, then join the civillians to this unit with the F2 key.

Share this post


Link to post
Share on other sites

isnt there an option in the right panel of the editor where you can choose what factions the civilians are hostile to?

Share this post


Link to post
Share on other sites

That is for independant :) Thanks prof its working

Share this post


Link to post
Share on other sites

insert that in a trigger or a script file

side1 setFriend [side2, val]

val is the level of relationship. 0 is hostile and 1 is friendly

for example you want the civilian to attack the west side:

civilian setFriend [west, 0]

west setFriend [civilian, 0]

Or if you want that the two civilians only attacking you:

name them civ1 and civ2 and then insert that command in a script file or a trigger:

Civ1 dotarget Player

civ2 dotarget player

Edited by Kiki

Share this post


Link to post
Share on other sites

Ye I wouldnt do that Kiki, as far as I know setting civs as hostile to any side will cause unexpected behaviour. For example the engine makes it so people dont keep attacking bodies by setting their side to civilian, also empty vehicles are set to civilian.

Share this post


Link to post
Share on other sites

Create two civilians named c1 and c2.

Create a russian rifleman, with init: groupa = group this; deleteVehicle this;

Create a radio trigger with this in on activation field: [c1] joinSilent groupa;

When you activate the trigger, he will join a group that is hostile to west and attack you, even if civilians in general remain friendly.

Note that if you do the same to several USMC soldiers, they will also attack eachother :) Also note that for two civies you might consider having them join separate empty opfor groups. Otherwise they will try to stay in formation, something they're not too good at.

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Or if you want that the two civilians only attacking you:

name them civ1 and civ2 and then insert that command in a script file or a trigger:

Civ1 dotarget Player

civ2 dotarget player

This one will not work. DoTarget make units target not engage. If you're not sure of what you're posting, please test it before.

insert that in a trigger or a script file

side1 setFriend [side2, val]

val is the level of relationship. 0 is hostile and 1 is friendly

for example you want the civilian to attack the west side:

civilian setFriend [west, 0]

west setFriend [civilian, 0]

This will make the whole civillian side hostile, which isn't very wise considering the fact that the OP only wants two civillians to be hostile.

Edited by ProfTournesol

Share this post


Link to post
Share on other sites

Trigger.

Con: p1 distance civ1 < 5;

ACK: civ1 addmagazine "30Rnd_556x45_Stanag"; civ1 addweapon "m4a1"; civ1 doFire p1;

Maybe this will work for you? This will also make it seem like they draw hidden weapons like pistols.

The addmagazine has to be before addweapon btw or the civ wont shoot...

(Edit: If a enemy civ is set to this setcaptive true;, but on a trigger is told to do the above he will still shoot at the player, or p1 in this case.)

---------------

You could maybe set every civillian as your enemy (friendly to Opfor), but add:

this setCaptive true;

To all the units inits you dont want to attack you.

This way you dont have to do anything with the two civs you want to attack you and they wont attack OPFOR, since there allied, or so I reckon since I havnt tested this. (Edit: Works)

Edited by JojoTheSlayer

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×