Welcome to Tactical Gamer

Results 1 to 9 of 9
Discussion: ArmA - Archives / Armed Assault - Tactics, Missions and Mod Discussions - Help with a trigger - Ok, here is the concept- two opposing forces simultaniouly fight for a city that is
  1. #1


    TheBigC's Avatar

    Join Date
    Jul 2005
    Location
    Just chilling...
    Posts
    3,868

    Help with a trigger

    Ok, here is the concept- two opposing forces simultaniouly fight for a city that is already occupied by a third faction.

    What trigger can I use to do for:

    The Idependent team holds the city against both forces?
    The East captures and holds the city?
    The West captures and holds the city?

    I have spent a long time on this one and all I really need is a end trigger..


    Thanks!
    The Meek shall inherit the earth..... after we're through with it!



  2.  
  3. #2

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    Re: Help with a trigger

    Could you use a combination of triggers that have BLUEFOR Not Present, OPFOR Not Present, and Independent Not Present? With variables, you could tie these to another trigger that ends the mission.

    For example...

    OPFOR Triggers (two): Set one to "BLUEFOR Not Present" and another to "Independent Not Present". Each trigger should cover the area you want held/defended. Let each trigger have a variable in its Activation that becomes true when the trigger condition is met. Then tie these variables to another trigger that ends the mission when it evaluates to true.


    You'd need similar triggers for the Independents and the BLUEFOR. You could likely include a percent calculation as well, so that the trigger variables would become true only if 10% or less of a certain faction remained.

  4.  
  5. #3


    TheBigC's Avatar

    Join Date
    Jul 2005
    Location
    Just chilling...
    Posts
    3,868

    Re: Help with a trigger

    That is the exact way I have it setup now! There are three triggers for that condition. But what I think I need is two of the conditions to be met. For example: if the East and Independent are not present, the West wins. That is the thing I am struggling through now is to combine them. And of any knows the variables for a condition to be a % like Strag mentioned, please do post..

    Thanks!!
    The Meek shall inherit the earth..... after we're through with it!



  6.  

     
  7. #4

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    Re: Help with a trigger

    Quote Originally Posted by TheBigC View Post
    That is the exact way I have it setup now! There are three triggers for that condition. But what I think I need is two of the conditions to be met. For example: if the East and Independent are not present, the West wins. That is the thing I am struggling through now is to combine them.
    Couldn't variables handle this?


    West Triggers

    Trigger 1:

    East Not Present
    (Condition) this;
    (Activation) Variable1 = 1;


    Trigger 2:

    Independents Not Present
    (Condition) this;
    (Activation) Variable2 = 1;


    Trigger 3:

    (Condition) Variable1 == 1 and Variable2 == 1;
    (Activation) West Wins



    You'd need similar trigger setups for the East and for the Independents.

  8.  
  9. #5


    TheBigC's Avatar

    Join Date
    Jul 2005
    Location
    Just chilling...
    Posts
    3,868

    Re: Help with a trigger

    That will probably be better than what I have currently. I was also looking at going a little deeper using the:

    if (alive player) && (enemycount == 0) then {hint "you win"}

    I may be able to manipulate that to set conditions with %. Anybody messed with the "&&" stuff?
    The Meek shall inherit the earth..... after we're through with it!



  10.  
  11. #6


    TheBigC's Avatar

    Join Date
    Jul 2005
    Location
    Just chilling...
    Posts
    3,868

    Re: Help with a trigger

    Nice call Strag, the triggers worked perfectly with the variables you gave. now all I have to do is create it with that % I really want, I hate looking for 1 guy to finish a mission.
    The Meek shall inherit the earth..... after we're through with it!



  12.  

     
  13. #7

    Strag's Avatar

    Join Date
    Jul 2005
    Location
    Columbus, OH, USA
    Age
    38
    Posts
    4,939

    Re: Help with a trigger

    Okay, C, I found a thread here that has something kinda like what you want to do with percentage of players remaining. A few alterations should get you what you need. Something this, maybe:

    For the East
    Make a trigger that covers the entire area of/around Bagango. In its Init field, put townarray = thisList;

    Create a script aliveeast.sqs that looks something like this:


    _percentage = 100;

    ; calculate how many east players are within the trigger area
    _totaleast = {side _x == east} count townarray

    #CheckAlive
    ? _percentage < 11 : goto "Done"

    ; calculate how many live east players are within the trigger area
    _aliveeast = {(alive _x) and (side _x == east)} count townarray

    ; calculate a percentage based on _aliveeast and _totaleast
    _percentage = (_aliveeast / _totaleast) * 100

    ; do calculation every ten (more?) seconds to save CPU cycles
    ~10
    goto "CheckAlive"

    #Done
    Exit



    I believe this script would be called from the trigger's Activation field.


    For your mission, I'd think you'd need this same thing for West, and also for Independent.

    This may not be exactly correct, but I believe the gist is right. I haven't tested it, so it'll probably take a bit of tweaking.
    Last edited by Strag; 02-26-2007 at 03:32 PM.

  14.  
  15. #8

    Catch22's Avatar

    Join Date
    Jan 2007
    Location
    I live.
    Posts
    36

    Re: Help with a trigger

    The 1.05 patch might add a function to make this simpler:

    # 5124 - New: New trigger types "Seized by ..."
    Not sure what this new trigger type will do, but it sounds like it could be used in this kind of mission.

  16.  
  17. #9

    Shiner's Avatar

    Join Date
    Jul 2005
    Location
    Dallas, TX
    Age
    34
    Posts
    2,380

    Re: Help with a trigger

    If your still working on this I have some sector control scripts that you can use as reference:


    the scoreBoard.sqf is included to show how I call the sector control script
    [corazolOPFORWEST, corazolBLUFORWEST, "CorazolWest"] execVM "TGSHI_scoreSectorControl.sqf";

    corazolOPFORWEST is a trigger that detects the presence of OPFOR soldiers
    corazolBLUFORWEST is a trigger that detects the presence of BLUFOR soldiers
    "CorazolWest" is simply the marker that shows the players who is in-control.

    For your situation you could add a third trigger for the guerillas and then modify the test accordingly.

    BTW my script only grants control at > 65%.
    Attached Files Attached Files
    |TG-12th| SHINER


  18.  

     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


  
 

Back to top