Forum Archive. A read-only snapshot of the Warfare Incorporated forums (2003–2020), preserved for historical purposes.  ·  warfareincorporated.com
Warfare Incorporated Forum

Capture Trigger
Author Message
Jackdeath
WI Forum Novice


Joined: 16 Mar 2004
Posts: 3
Location: Montreal, Quebec, CANADA
 Post Posted: Tue Mar 16, 2004 3:43 am  Post subject: Capture Trigger

How do I set up a trigger for the capture of structures?
Wizard
Established Forum User


Joined: 30 Nov 2003
Posts: 68
Location: Bristol, England
 Post Posted: Wed Mar 17, 2004 2:03 am  

Thats a tough one, as the only viable way (that I can think of whilst still asleep) is a count of the buildings, and if that count increases then do something.

You could also tie in with the 'lost' of a raider, as raiders are a single-use item only.

W
scottlu
WI Founder


Joined: 15 Aug 2003
Posts: 1773
 Post Posted: Wed Mar 17, 2004 10:55 am  

You can do it with an area that encloses the structure, then check the area for the structure of a given type, owned by a given side.
Jackdeath
WI Forum Novice


Joined: 16 Mar 2004
Posts: 3
Location: Montreal, Quebec, CANADA
 Post Posted: Wed Mar 17, 2004 2:29 pm  

Yes, that would work. But, how would I differentiate between structures that were captured from ones that were destroyed? In a scenario where a captured structure would bring an 'End Mission: win' condition and a destroyed structure would bring an 'End Mission: lose' condition, how could I tell the difference between the two?
SoLan
Very Active User


Joined: 13 Jan 2004
Posts: 183
 Post Posted: Wed Mar 17, 2004 2:54 pm  

You can do this by creating an area that encloses the structure and then setting two triggers. The first trigger tests for area contains 0 *insert structure type here* owned by any side (structure is destroyed) with a trigger action of End Mission: Lose. The second trigger tests for area contains 1 *insert structure type here* owned by *human side* (structure is captured by human side) with a trigger action of End Mission: Win.
Jackdeath
WI Forum Novice


Joined: 16 Mar 2004
Posts: 3
Location: Montreal, Quebec, CANADA
 Post Posted: Wed Mar 17, 2004 4:25 pm  

I can foresee no problems when observing a condition for destroying a structure, but if captured wouldn't that bring about both conditions? One side's gain is another side's loss. Which would take precedent?
SoLan
Very Active User


Joined: 13 Jan 2004
Posts: 183
 Post Posted: Wed Mar 17, 2004 4:39 pm  

If you test for a structure owned by any side, then that is true as long as there is a structure of the type that you specify in the area no matter which side owns it. Area contains 0 *insert structure type here* owned by any side will not be true unless no side owns any of the specified structure in that area.

As an alternative you can test for area contains exactly 0 *insert structure type here* owned by *human side* and exactly 0 *insert structure type here* owned by *computer side* for the End Mission: Lose trigger.
scottlu
WI Founder


Joined: 15 Aug 2003
Posts: 1773
 Post Posted: Thu Mar 18, 2004 12:32 am  

Another item to know is that triggers get executed one at a time, in the order listed.