-
02-19-2007, 07:47 PM #1
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!
-
02-20-2007, 01:48 PM #2
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.
-
02-20-2007, 07:10 PM #3
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!
-
02-21-2007, 05:14 PM #4
Re: Help with a trigger
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.
-
02-21-2007, 07:12 PM #5
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!
-
02-25-2007, 04:19 PM #6
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!
-
02-26-2007, 02:38 PM #7
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.
-
02-28-2007, 11:41 PM #8
Re: Help with a trigger
The 1.05 patch might add a function to make this simpler:
Not sure what this new trigger type will do, but it sounds like it could be used in this kind of mission.# 5124 - New: New trigger types "Seized by ..."
-
03-02-2007, 09:42 PM #9
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%.|TG-12th| SHINER









Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)








Bookmarks