Jump to content
Sign in to follow this  
Herbal Influence

OPFOR shot down by Civilists

Recommended Posts

For my mission I need OPFOR to react to CIVILISTS shooting at them.

It works with BLUFOR - after you, as CIVI, shoot one or two of them down, they kill you.

But not with OPFOR ... why? Anyone any idea?

Can the communist thought really be so deeply rooted ??!! ;-)))

Share this post


Link to post
Share on other sites

Ah that's easy ... just take a russian unit and a civilian and give them a name. Then use this in a trigger:

Name_of_the_Unit doTarget Name_of_Civilian1; Name_of_the_Unit doFire Name_of_Civilian1; Civilian1 addRating -10000;

Share this post


Link to post
Share on other sites

It's a general problem with the logic in the game. If you want it to treat you as a civilian until you shoot at them, you have to make some triggers.

I wanted to make a "CIA-mission" where your character is shown as civilian. The way I had to do it was to take some civvies, group them together, make a higher ranking blufor soldier with probability of presence to 0, group civvies with him. Now the civvies are considered Blufor. Then I use setCaptive = True on the civvies so the OPFOR wouldn't shoot them until they did something wrong. I made a trigger where setCaptive = false when they entered a no access area, but what trigger you want is up to you.

Read more about the sides logic here:

http://forums.bistudio.com/showthread.php?t=86189

and vote on the bugtracker here: http://dev-heaven.net/issues/show/4434

Share this post


Link to post
Share on other sites

No problem ... but I don't know if the unit who kills the civilian will become an enemy to its own troops. You can avoid this by setting Name_of_the_Russian addRating 10000; after he killed the civilian. This way he should stay friendly. However I haven't tested it.

Share this post


Link to post
Share on other sites

@Rekrul:

One noobie question though ...

How to "group Civvies with him" ... did try it with synchronize and drawn the lines ... but doesn't work ...

Share this post


Link to post
Share on other sites

Thanx!

But OPFOR killed all the Civies immediately ... :-(

(Talkin of Rekruls proposal; Legislatives works fine but is only half the way in my mission).

Share this post


Link to post
Share on other sites

So what's the other half? In my current mission a T-90 attacks standalone civilians (no groupy doopy doo with F2). After killing civilian 1 a second trigger checks his condition:

Condition: !alive Name_of_Civilian_1

On Activation: Name_of_Russian doTarget Name_of_Civilian2; Name_of_Russian doFire Name_of_Civilian2; Name_of_Civilian2 addRating -10000;

This way the unit attacks civilians one by one. But I recommend this solution if you have very few civilians. For more than 10 civs you should use script. But I don't know how to write it so you'll need a real expert on this.

Share this post


Link to post
Share on other sites

@Legislator:

Thanx for your reply.

Remaining problem is that I need the whole OPFOR - Group to punish the special civi for

- a killing of one (or more) OPFOR soldier and/or

- leaving the special custody area

he does. And there are more civis to join him in the rebellion.

It shall be an insurgency of civis against their OPFOR - custodians where UMSC comes to help by paras.

Or better said: The jailed civis support the incoming BLUFORs by rebelling against their OPFOR-suppressors.

(No offence to Russia - I would have made it the other way round if OPFOR would have such a nice big transport plane like the c-130 - who helps to transport a lot inf for para.)

Edited by Herbal Influence

Share this post


Link to post
Share on other sites

Herbal: Did you remember setCaptive = True?

I'll post my test-mission, where I played around with this, here later. I tested different things so I'm not sure if it actually works anymore.

Share this post


Link to post
Share on other sites
@Legislator:

Thanx for your reply.

Remaining problem is that I need the whole OPFOR - Group to punish the special civi for

Interesting setup.

Try

{_x doTarget Name_of_Civilian2} foreach units Name_of_RussianGroupLeader; {_x doFire Name_of_Civilian2} foreach units Name_of_RussianGroupLeader;

instead of the previous one and adept it. This way every unit of that group will target and attack the civilian.

Share this post


Link to post
Share on other sites

My test-mission was so simple, I decided to just write it here.

1. First put a civilian as player with init field "this setCaptive true;" and place it anywhere in the editor. Then put another non-playable civilian there but with lower rank than you and "doStop this;" in the init field.

2. Take a bluefor soldier with higher rank than the civilians, set prob. of presence to 0%.

3. Press f2, then click and hold on the civilian and drag to bluefor soldier. There should now be a blue line between them. Do this for both civilians

4. Press f3 and doubleclick somewhere in editor (map area) and you get the trigger box up. Keep the axis >0 so you get an area trigger, select Repeatedly, and in the On Act-field you write:

titleText ["You have been detected...","Plain"]; player setCaptive false;

and in the On Dea field you write

titleText ["safe","Plain"]; player setCaptive true;

and click OK.

5. Press F2 and group the trigger with the Blufor soldier like you did in item 3.

6. Press F3 and doubleclick the trigger. Now change Activation (drop down box) to "Any Group member" and click on the box "Detected by OPFOR" box and ok.

7. Place OPFORs in the trigger area.

Note the actions we put in On Act. field in the trigger means that if either you or the AI civilian enters the trigger area, only you will be shot. He will be fine. If he or you moves out of the area again, you're safe. You can experiment with this to get the desired behavior but please note that the "setCaptive True/False" setting is abit unstable and it will take some time before they react to you being hostile or friendly (captive) espcially when changing status.

Share this post


Link to post
Share on other sites

Hey, guys, thank you both (@Rekrul: yes, I did do "setCaptive = True").

I will try your new proposals as soon as I can - and will report on it here!

Share this post


Link to post
Share on other sites
My test-mission was so simple, I decided to just write it here.

1. First put a civilian as player with init field "this setCaptive true;" and place it anywhere in the editor. Then put another non-playable civilian there but with lower rank than you and "doStop this;" in the init field.

2. Take a bluefor soldier with higher rank than the civilians, set prob. of presence to 0%.

3. Press f2, then click and hold on the civilian and drag to bluefor soldier. There should now be a blue line between them. Do this for both civilians

4. Press f3 and doubleclick somewhere in editor (map area) and you get the trigger box up. Keep the axis >0 so you get an area trigger, select Repeatedly, and in the On Act-field you write:

titleText ["You have been detected...","Plain"]; player setCaptive false;

and in the On Dea field you write

titleText ["safe","Plain"]; player setCaptive true;

and click OK.

5. Press F2 and group the trigger with the Blufor soldier like you did in item 3.

6. Press F3 and doubleclick the trigger. Now change Activation (drop down box) to "Any Group member" and click on the box "Detected by OPFOR" box and ok.

7. Place OPFORs in the trigger area.

Note the actions we put in On Act. field in the trigger means that if either you or the AI civilian enters the trigger area, only you will be shot. He will be fine. If he or you moves out of the area again, you're safe. You can experiment with this to get the desired behavior but please note that the "setCaptive True/False" setting is abit unstable and it will take some time before they react to you being hostile or friendly (captive) espcially when changing status.

Wow ... nice ...

Effect is:

The other civi gets immediately shot by OPFOR when entering triggerarea.

I - other civi - don't get shot at all.

Yes, I checked the ranks (Blufor highest rank, me middle, other civi lowest).

But thanx - I think I will learn a lot by this.

One reason:

The activation of the trigger doesn't work no more with "everyone" since they are considered as BLUFOR. The option "everyone" simply does no more show up once you are on a special side or "captive".

Maybe your first idea was okay and I messed it: I inserted the "=" into the "setCaptive true"

I'll try that again without the "=".

EDIT: No. Doesn't change anything.

Edited by Herbal Influence

Share this post


Link to post
Share on other sites
Interesting setup.

Try

{_x doTarget Name_of_Civilian2} foreach units Name_of_RussianGroupLeader; {_x doFire Name_of_Civilian2} foreach units Name_of_RussianGroupLeader;

instead of the previous one and adept it. This way every unit of that group will target and attack the civilian.

I need the Civis only be targeted by OPFOR when either

a) they shoot at OPFOR or they

b) leave a certain area

or both.

I think that's not met with the above code. :o

Share this post


Link to post
Share on other sites

One reason:

The activation of the trigger doesn't work no more with "everyone" since they are considered as BLUFOR. The option "everyone" simply does no more show up once you are on a special side or "captive".

The activation should be "Any Group Member". That's not available before you group the trigger to the BLUFOR soldier (with 0% presence).

---------- Post added at 04:21 PM ---------- Previous post was at 04:19 PM ----------

I need the Civis only be targeted by OPFOR when either

a) they shoot at OPFOR or they

b) leave a certain area

or both.

I think that's not met with the above code. :o

If you do that in the On Act trigger field, it should.

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  

×