![]() |


|
|||||||
| Armed Assault - Tactics, Missions and Mod Discussions Discussion about Armed Assault tactics, maps, missions and mods. |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Location: Around
Age: 36
Posts: 3,179
|
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 (permalink) |
![]() ![]() Join Date: Jul 2005
Location: Columbus, OH, USA
Age: 34
Posts: 5,004
|
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. |
|
|
|
| Sponsored links | |
|
|
|
|
|
#3 (permalink) |
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Location: Around
Age: 36
Posts: 3,179
|
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! |
|
|
|
|
|
#4 (permalink) | |
![]() ![]() Join Date: Jul 2005
Location: Columbus, OH, USA
Age: 34
Posts: 5,004
|
Re: Help with a trigger
Quote:
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. |
|
|
|
|
|
|
#5 (permalink) |
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Location: Around
Age: 36
Posts: 3,179
|
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! |
|
|
|
|
|
#6 (permalink) |
![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Location: Around
Age: 36
Posts: 3,179
|
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! |
|
|
|
| Sponsored links | |
|
|
|
|
|
#7 (permalink) |
![]() ![]() Join Date: Jul 2005
Location: Columbus, OH, USA
Age: 34
Posts: 5,004
|
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. |
|
|
|
|
|
#8 (permalink) | |
|
Join Date: Jan 2007
Posts: 35
|
Re: Help with a trigger
The 1.05 patch might add a function to make this simpler:
Quote:
__________________
![]() ![]()
|
|
|
|
|
|
|
#9 (permalink) |
![]() Join Date: Jul 2005
Location: Dallas, TX
Age: 30
Posts: 2,259
|
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%.
__________________
![]() ![]() ![]() |
|
|
|
| Sponsored links | |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|

