Jump to content
avibird 1

trigger setup when all IND and OPFOR units are dead in AO. not working anymore?

Recommended Posts

I have been using this code in a trigger to end some of my mission when all IND and OPFOR units are dead in a AO. The code does not work anymore. The mission ends when either fraction has no alive units in the area. The code did work when both fraction have no units alive. I don't know if any commands have changed with any updates.

 

here is my code in Two triggers

 

 

 

 Trigger.init                                   Variable name               c1

                                                         Text                               End Game Ind All Dead

 Trigger Transformation             size                                A 20000  B 1000  C -1

 

 Trigger Activiation                    Type                                None

                                                       Activation                       Independent                

                                                       Activation Type             Not present

Trigger expression                    Condition                        call{this}

                                                      On  Activation                call{c1UnitsDead = true; }

 

 

 

 

Trigger.init                                    Variable  name               c2

                                                         Text                               End Game Opfor All Dead

 Trigger Transformation             size                                A 20000  B 1000  C -1

 

 Trigger Activiation                    Type                                None

                                                       Activation                       Opfpr           

                                                       Activation Type             Not present

Trigger expression                    Condition                        call{this}

                                                      On  Activation                call{c2UnitsDead = true; }

 

 

 

 Trigger.init                                Variable name               Task13_Succeeded

                                                     Text                                  Eliminate all hostile forces in the AO

Trigger Transformation           size                                  A 0    B 0   C-1

Trigger Activiation                    Type                                None

                                                      Activation                       None   

 

Trigger expression                    Condition                       call{ c1unitsdead && c2unitsdead }                              

                                                      On  Activation              call{["Task13","SUCCEEDED"] call BIS_fnc_tasksetstate;  "END1" call BIS_fnc_endMissionServer;}             

 

 

The mission ends when either IND units are dead or OPfor units dead. it used to work when all IND and Opfor units were dead.  now if only one side is dead. how DO I fix this Avibird.

 

 

 

 

Share this post


Link to post
Share on other sites

 

Quote

  Condition                       call{this}

 On  Activation                call{c1UnitsDead = true; }

condition -------------------->  this

On activation --------------> c1UnitsDead = true;

 

Quote

 

Condition                        call{this}

On  Activation                call{c2UnitsDead = true; }

 

Condition ---------------->  this

On activation ----------->  C2Unitsdead = true;

 

Quote

 

Condition                     call{ c1unitsdead && c2unitsdead }                              

On  Activation              call{["Task13","SUCCEEDED"] call BIS_fnc_tasksetstate;  "END1" call BIS_fnc_endMissionServer;}        

 

Condition ----------------->  c1unitsdead && c2unitsdead

On Activation ------------> [ ] call BIS_fnc_endmission;

Share this post


Link to post
Share on other sites

Hey Gunter did something change because this was working for years but not now. I will try to insert your code to the triggers and see if it works as intended. 

Share this post


Link to post
Share on other sites

 

Hey Gunter thanks works again.

I don't understand why it stopped working after all this time. The old code worked fine for years SMH. 

Share this post


Link to post
Share on other sites

Welcome, its because of the extra brackets, sometimes its best to type the code in then to copy and paste.

I forget the reason why but i think either copying and pasting triggers with code in them adds the extra brackets, or when the

scenario is reloaded with the new copy, it adds the brackets and the call at the beginning.

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

×