Go Back   Tactical Gamer > Simulation > Armed Assault > Armed Assault - Tactics, Missions and Mod Discussions


Armed Assault - Tactics, Missions and Mod Discussions Discussion about Armed Assault tactics, maps, missions and mods.

Reply
 
Thread Tools
Old 02-19-2007, 07:47 PM   #1 (permalink)



 
TheBigC's Avatar
 
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!

TheBigC is offline   Reply With Quote
Old 02-20-2007, 01:48 PM   #2 (permalink)

 
Strag's Avatar
 
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.
Strag is offline   Reply With Quote
Sponsored links
Old 02-20-2007, 07:10 PM   #3 (permalink)



 
TheBigC's Avatar
 
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!

TheBigC is offline   Reply With Quote
Old 02-21-2007, 05:14 PM   #4 (permalink)

 
Strag's Avatar
 
Join Date: Jul 2005
Location: Columbus, OH, USA
Age: 34
Posts: 5,004
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.
Strag is offline   Reply With Quote
Old 02-21-2007, 07:12 PM   #5 (permalink)



 
TheBigC's Avatar
 
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!

TheBigC is offline   Reply With Quote
Old 02-25-2007, 04:19 PM   #6 (permalink)



 
TheBigC's Avatar
 
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!

TheBigC is offline   Reply With Quote
Sponsored links
Old 02-26-2007, 02:38 PM   #7 (permalink)

 
Strag's Avatar
 
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.
Strag is offline   Reply With Quote
Old 02-28-2007, 11:41 PM   #8 (permalink)
 
Catch22's Avatar
 
Join Date: Jan 2007
Posts: 35
Re: Help with a trigger

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

Quote:
# 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.
__________________

Catch22 is offline   Reply With Quote
Old 03-02-2007, 09:42 PM   #9 (permalink)
 
Shiner's Avatar
 
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%.
Attached Files
File Type: zip TGSHI_scoreSectorControl.zip (1.2 KB, 2 views)
__________________

Shiner is offline   Reply With Quote
Sponsored links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -4. The time now is 01:30 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
©2004-2008 - Tactical Gamer - All Rights Reserved