![]() |
| Warfare Incorporated Forum Index » Enhancement Requests » |
| Activate trigger trigger |
| Author | Message | |
|---|---|---|
|
galm ForeRunner Joined: 18 Oct 2009 Posts: 2382 Location: New York |
What if there was a trigger that was like, if area r4 contains at least one unit, activate trigger t2.
|
|
|
trineroks Chief Administrator Joined: 16 Oct 2009 Posts: 1770 Location: Southern Cali (UCLA) |
thats called a switch, galm
|
|
|
galm ForeRunner Joined: 18 Oct 2009 Posts: 2382 Location: New York |
oh yeah lolz thanks trine. I forgot about those. But it just says turn switch on or off, idr how to make it do what i want.
|
|
|
N@TE Chief Administrator Emeritus Joined: 06 Dec 2009 Posts: 985 Location: Colorado |
Using a switch requires two triggers. You need to first create a switch by going to "Settings" and then "Switches". As suggested by you, we'll name the switch "t2".
You will use the Area Contains Units condition and the Set Switch action. Here's an example: Conditions: Area 'r4' contains AtLeast 1 Any Unit owned by AllSides. Actions: Set Switch t2 On. For the second trigger(and all others using this switch), it will use the Switch On/OFF condition, and will be paired any desired actions. An example would look like this: Conditions: Switch t2 is On Actions: Show alert "A unit is in the area!" Hope this helps, and if you have any other question you know where to find me. Last edited by N@TE on Tue Nov 30, 2010 9:03 pm; edited 1 time in total |
|
|
LawrenceA Administrator Joined: 15 Feb 2010 Posts: 1135 Location: New Zealand |
galm wrote: What if there was a trigger that was like, if area r4 contains at least one unit, activate trigger t2. i don't use switches myself. i use pvars.for your example you could change the trigger to if area r4 contains at least one unit, modify persistent variable x set 1. then in the trigger you want to activate you can add a condition that pvar x has to be exactly 1 |
|
|
galm ForeRunner Joined: 18 Oct 2009 Posts: 2382 Location: New York |
I used switches it was easier.
|
|
|
galm ForeRunner Joined: 18 Oct 2009 Posts: 2382 Location: New York |
Is there a way to once u enter one area you cant go back, like area p contains 1 unit owned by whatever do blah blah blah but then say overide effects of trigger balnk.
|
|
|
trineroks Chief Administrator Joined: 16 Oct 2009 Posts: 1770 Location: Southern Cali (UCLA) |
galm wrote: Is there a way to once u enter one area you cant go back, like area p contains 1 unit owned by whatever do blah blah blah but then say overide effects of trigger balnk. that's when you make a switch a conditionthis is what i would do: Conditions: Area p contains at least 1 unit owned by side[] Actions: Turn switch "goback" ON New Trigger: Conditions: Area p contains at least 1 unit owned by side{} Switch "goback" is ON Actions: Move all units owned by side[] from area p to area goback. |
|
|
N@TE Chief Administrator Emeritus Joined: 06 Dec 2009 Posts: 985 Location: Colorado |
galm wrote: Is there a way to once u enter one area you cant go back, like area p contains 1 unit owned by whatever do blah blah blah but then say overide effects of trigger balnk. crackerz wrote: TOPIC: Restricted Areas - Post 11 of the topic "craker crumbs - Tips & Tricks with M" in the Mission Authoring forum. Say you have an area that must be accessible, but not really. For example, you have an enclosed space to protect a structure, and you absolutely positively do not want anybody near it. You can't block it off, or you get errors at compile time. Here is a method I use: First, create an area that covers the desired restricted zone. I'll call mine "RestrictedZone". Second, create an area close nearby, if not actually adjoining the "restricted zone". I'll call mine "RallyPoint". CONDITIONS: -Area "RestrictedZone" contains Atleast 1 AnyUnit owned by AllSides ACTIONS: -Move AllSides AnyUnit from 'RestrictedZone' to 'RallyPoint' -Preserve Trigger You could modify the above to only restrict certain sides. You could also add the Elapsed Time condition to end the restriction after so many seconds. Link: http://www.warfareincorporated.com/xyzzy/viewtopic.php?t=1059&highlight=Restricted%20Areas I used this trigger many times on many maps before version 1.61 released to prevent players form building under the minimap. With version 1.61 out, there is no longer a need to use this trigger for this purpose. However, it can still be used for many other things. Last edited by N@TE on Mon Dec 06, 2010 8:58 pm; edited 2 times in total |
|
|
galm ForeRunner Joined: 18 Oct 2009 Posts: 2382 Location: New York |
No no I got the switches thnxs for the refresher Nate but I mean like if I have a survival map and one room has little zombies in it and the next more if they go back to the old it should stay more.
|
|
| Back to top · Warfare Incorporated Forum Index |