Jump to content
Sign in to follow this  
william516

Green on blue using ANP in a mission

Recommended Posts

This is a new idea and seperate training aid that i am trying to figure out hopefully without using a ton of scripts. The idea is to show just how dangerous it is when someone you thought was friendly will turn against you. Something that is happening all too often overseas right now. I have figured out how to make a trigger fire off at random prob. but now i can not figure out how to get an ANP to turn against blufor.

Here is what was suggested but does not seem to work.

I created a mission with nothing more then a few blufor units one being the player "griffen1" then several units set from blufor menu as Afghan army named anp1, anp2, anp3, anp4

I created a radio trigger to test the effects and be sure the trigger is firing "radio alpha"

Radio alpha will then set [anp1, anp2, anp3, anp4] doFire griffen1. This does nothing at all, unit just continues to follow waypoints

same setup

changed trigger to

(anp1) addRating -10000 (did this for all anp units

Player and blufor units will shoot the second the trigger is tripped anp units do not fire a shot

same setup

tried grouping an enemy officer (opfor unit) and setting prob to 0 no trigger just to see results as per the "side relations" discussion on the site

Result was that the units did nothing again. It wasn't until the officer actually showed in the mission that the units opened fire on the blufor units "griffen1

Almost seems that is the leader is not present the anp units do not group to the officer.

I'm looking for a way to get the anp units to turn and fire on ANY blufor unit that it comes in contact with until the new enemy is killed. This will happen random based on a trigger that i will be setting. I have been reading that setfriend is NOT a good way to go. Hopefully someone has played around with this and can help. I also tried join and lead using a synched waypoint with the enemy leader being set to prob. of 0% and again it did nothing.

Any help would be great. I will keep playing around and maybe stumble across something, if i do i will let everyone know.

Thanks again

bill

Share this post


Link to post
Share on other sites

Assuming ANP = Independent Faction.

Resistance setFriend [WEST,0];
WEST setFriend [Resistance,0];

If this is too simplistic I do not mean to patronize, just trying to chip in some possibilities.

Share this post


Link to post
Share on other sites

I think he just wants some, not all, green to go red, but not sure. I swear I had a demo of that working, but can't find it.

Share this post


Link to post
Share on other sites
Assuming ANP = Independent Faction.

Resistance setFriend [WEST,0];
WEST setFriend [Resistance,0];

If this is too simplistic I do not mean to patronize, just trying to chip in some possibilities.

Wouldn't work ANA/ANP are BLUFOR... although it seems like the mod author should start reconsidering if things keep up ...

Interested to see this, though. Have you tried grouping an OPFOR officer to the units using a trigger? Says you tried grouping without a trigger above.

Share this post


Link to post
Share on other sites

1) Create an OPFOR unit in some random corner of the map called unitOPFOR

2) Join the ANP member to the OPFOR units group via [unitANP] join unitOPFOR

3) Delete the unitOPFOR and the ANP will now become hostile to BLUFOR.

Share this post


Link to post
Share on other sites

What kushluk said. You may want the OPFOR unit to be present at the scene and invisible, otherwise the traitor may run back to formation rather than engage.

Share this post


Link to post
Share on other sites

Ok i tried the first approach before and unless i was doing something wrong the only time it worked is if the unit was physically able to be seen. Once they joined his group they opened fire on the blufor units. The second i added the prob. set to 0% they no longer functioned at all. They stood around looking stupid and if i fired on them i was warned that i was shooting friendly units. I also tried adding the command "deleteVehicle this" into the anp5 (opfor officer control) init script. It did the same thing as the above example. It seems that the only time they follow orders and join the group is if the unit can be physically seen.

"Wouldn't work ANA/ANP are BLUFOR... although it seems like the mod author should start reconsidering if things keep up ...

Interested to see this, though. Have you tried grouping an OPFOR officer to the units using a trigger? Says you tried grouping without a trigger above." He is right the ANA/ANP are considered and grouped under blufor and maybe thats why i cant get them to attack another blufor unit. I have not yet tried the same with the indep. faction to see if it makes a difference. The goal is to make this happen with a random trigger just like the vbied i have on another test mission. In other words you may run the mission many times and only one time does the anp unit attack your unit while in a briefing or something unexpected. Again designed to be used as a training aid for our unit once i get it right and recorded.

I have also tried a trigger with the command for

dotarget

dofire

commands and it looks like the units attempt to fire but they never can. they never even raise their weapons. This was in the trigger act area and the trigger set to radio alpha.

So far nothing i do seems to work correctly. It may be worth it to set them as indep units and then use the setfriend command but there are all sorts or warnings about this causing problems.

Thanks again and i will try a few more things. It cant be this hard to do something that should be so simple.

Bill

Share this post


Link to post
Share on other sites

Update....im starting to think that it may be a problem with the ana/anp units. I created a group of ind. Units and set each one first. Tried out the mission. They did not fire at me. I then edited my trigger so that the units would first be grouped to null and then to anp5 (the enemy soldier set to prob 0%). The trigger is set via radio alpha.

The second the radio was triggered the ind units began firing at my squad. However according to the map and ai they were not red or considered an enemy. Could prob fix this with a setrating command.

Still playing around with this. What is the chance that a restriction is put in the game that says blufor may not fire on blufor atleast the ai can not be made to fire.

Bill

Share this post


Link to post
Share on other sites

Another little update on the progress or lack of progress on this.

I created another mission again using the blufor units and ANA/ANP's. I also added some indep units with a few locals. Then i placed my squad as a group and me as a sub. under command. I set the ammo of my squad to 0%

Anp1, anp2, anp3, anp4 are all grouped together, then via trigger it would make them set to "opforoff1" this is the officer with prob of prec. set to 0%. The "opforoff1" is given the rank of LT.

The independent faction unit names are ind1, ind2, ind3, ind4, ind5 then there are two civilians with civ1, civ2

Experiment 1 with green on blue fire

Anp1, Anp2, Anp3,Anp4 set to trigger alpha"radio"

Trigger has in it

[anp1, anp2, anp3, anp4] join grpNull;[anp1, anp2, anp3, anp4] join opforoff1;

Results: The trigger fires and the anp's do nothing, even when fired at they simply crouch to the ground and if i do fire at them i am warned the im firing on friendlies

Experiment 2

Same set up as the first, trigger has been changed

trigger has in it: [anp1, anp2, anp3, anp4] join grpNull;[anp1, anp2, anp3, anp4] join opforoff1;(anp1) addRating -10000;;(anp2) addRating -10000;(anp3) addRating -10000;(anp4) addRating -10000;

Results: Trigger activated and my team will tell me to target and fire at the anps. If they had ammo they would shoot to kill. Anp's still do nothing at all. Color of the unit on the map changes from green to orange. When firing on the anp units. I am not warned and told to fire on each unit.

Experiment 3

Same setup with anp units. Added ind units ind1, ind2, ind3, ind4, ind5.

Triggers has in it: Resistance setFriend [WEST,0]; [anp1, anp2, anp3, anp4] join grpNull;[anp1, anp2, anp3, anp4] join opforoff1; [ind1, ind2, ind3, ind4, ind5] join grpNull; [ind1, ind2, ind3, ind4, ind5] join opforoff1; (ind1) addRating -10000; (ind2) addRating -10000; (ind3) addRating -10000; (ind4) addRating -10000; (ind5) addRating -10000; (anp3) addRating -10000; (anp4) addRating -10000;

Results: By far the most interesting and funniest to watch. Lets just say a firefight free for all. All ind units took a few steps once the trigger was activated and turned and shot one another. Ind units that survived this turned and shot at the anp's and also my squad. Close to the results i was looking for except the whole slaughter of the ind units. I'm assuming that the addrating -10000 is what caused the whole firefight to occur. My unit attempted to engage but again did not have ammo just for the test.

Experiment 4

Same test as test 3.

Trigger has in it: Resistance setFriend [WEST,0]; [anp1, anp2, anp3, anp4] join grpNull;[anp1, anp2, anp3, anp4] join opforoff1; [ind1, ind2, ind3, ind4, ind5] join grpNull; [ind1, ind2, ind3, ind4, ind5] join opforoff1; (ind1) addRating -10000;

Results: The slaughterfest was not as bad but confirmed my susp. on the addrating -10000. The first units to be shot were ind1. My group did nothing as they were shot to death by the other ind units. I was never ordered to fire and on this expermiment i also gave my team some ammo. Not a single shot. The map showed all ind units that were firing at me as orange. THe ind units shot and killed all the anp's the anp's did not fire a shot to protect themselves. This is driving my crazy

So far no luck with the test. It seems that if the addrating -10000 is not used the units will fire and kill every unit and still remain friendly. If the addrating -10000 IS used the units will see eachother as a threat even if on the same team and kill each other. I will try and group them together prior to grouping them to the opforoff1 and see if that changes the kill everything attitude. Hopefully someone can help me with this problem. Any takers lol?

I will keep playing around and see if i can figure something more out.

Bill

Share this post


Link to post
Share on other sites

Have you tried this http://forums.bistudio.com/showthread.php?133269-Make-Afrenian-Army-enemy&p=2133034&viewfull=1#post2133034

I tried using just a bit of the code in a waypoint and it sort of worked.

Two groups walking towards each other both side west

The leader of the bag guys is named red and then in the waypoint on act

{_x setCaptive true} foreach units red;badgrp = createGroup east;{[_x] joinSilent grpNull;[_x] joinSilent badgrp} foreach units red;  null=[] spawn {sleep 8;{_x setCaptive false} foreach units red}

it seems to need a delay as it takes a while for things to register.

You will also need an OPFOR on the map or nothing will happen.

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Have you tried this http://forums.bistudio.com/showthread.php?133269-Make-Afrenian-Army-enemy&p=2133034&viewfull=1#post2133034

I tried using just a bit of the code in a waypoint and it sort of worked.

Two groups walking towards each other both side west

The leader of the bag guys is named red and then in the waypoint on act

{_x setCaptive true} foreach units red;badgrp = createGroup east;{[_x] joinSilent grpNull;[_x] joinSilent badgrp} foreach units red;  null=[] spawn {sleep 8;{_x setCaptive false} foreach units red}

it seems to need a delay as it takes a while for things to register.

You will also need an OPFOR on the map or nothing will happen.

Ok again thanks for the help but im a little lost on the code you used and how it was obtained. I attemped this code by creating two groups on blufor (player) another blufor ANA/ANP (to turn bad). They are assigned waypoints to meet in the middle. then a radio trigger alpha to trip trigger. (this ensures it fires off)

instead of "red" i substituted in "anp1", instead of badgroup i used "opforoff1" (assuming this was the bad guy according to your script) Sleep time i left the same and even changed it to 10. Nothing worked when the trigger was tripped. They stood around and watched each other it appeared that there was a motion to engage but nothing was actually done.

Do i need to set a group name. I'm very confused. For units i have each group "grouped together" via the blue line. in the leader i added "anp1 = group this" This should make all units group with anp1 if needed in a script correct? I'm sorry im now more lost but will keep working on it.

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  

×