View previous topic :: View next topic |
Author |
Message |
galm ForeRunner
Joined: 18 Oct 2009 Posts: 2382 Location: New York
|
Posted: Wed Oct 06, 2010 6:28 pm Post subject: Activate trigger trigger |
|
|
What if there was a trigger that was like, if area r4 contains at least one unit, activate trigger t2. _________________ "All held the finite and infinite as unrelated. None could foresee that the history of the two would become one." |
|
Back to top |
|
|
trineroks Chief Administrator
Joined: 16 Oct 2009 Posts: 1770 Location: Southern Cali (UCLA)
|
Posted: Wed Oct 06, 2010 7:11 pm Post subject: |
|
|
thats called a switch, galm _________________ It's the essence of combat; kill, or be killed.
---------------------------------
|
|
Back to top |
|
|
galm ForeRunner
Joined: 18 Oct 2009 Posts: 2382 Location: New York
|
Posted: Wed Oct 06, 2010 7:14 pm Post subject: |
|
|
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. _________________ "All held the finite and infinite as unrelated. None could foresee that the history of the two would become one." |
|
Back to top |
|
|
N@TE Chief Administrator Emeritus
Joined: 06 Dec 2009 Posts: 985 Location: Colorado
|
Posted: Wed Oct 06, 2010 8:20 pm Post subject: switch |
|
|
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. _________________ Warfare Incorporated Former Head of Administration || Steam username: WINate
Last edited by N@TE on Tue Nov 30, 2010 9:03 pm; edited 1 time in total |
|
Back to top |
|
|
LawrenceA Administrator
Joined: 15 Feb 2010 Posts: 1135 Location: New Zealand
|
Posted: Wed Oct 06, 2010 10:17 pm Post subject: Re: Activate trigger trigger |
|
|
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 _________________ You've just been |
|
Back to top |
|
|
galm ForeRunner
Joined: 18 Oct 2009 Posts: 2382 Location: New York
|
Posted: Thu Oct 07, 2010 6:17 pm Post subject: |
|
|
I used switches it was easier. _________________ "All held the finite and infinite as unrelated. None could foresee that the history of the two would become one." |
|
Back to top |
|
|
galm ForeRunner
Joined: 18 Oct 2009 Posts: 2382 Location: New York
|
Posted: Thu Oct 07, 2010 7:09 pm Post subject: |
|
|
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. _________________ "All held the finite and infinite as unrelated. None could foresee that the history of the two would become one." |
|
Back to top |
|
|
trineroks Chief Administrator
Joined: 16 Oct 2009 Posts: 1770 Location: Southern Cali (UCLA)
|
Posted: Thu Oct 07, 2010 7:42 pm Post subject: |
|
|
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 condition
this 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. _________________ It's the essence of combat; kill, or be killed.
---------------------------------
|
|
Back to top |
|
|
N@TE Chief Administrator Emeritus
Joined: 06 Dec 2009 Posts: 985 Location: Colorado
|
Posted: Thu Oct 07, 2010 7:50 pm Post subject: Restricted Areas |
|
|
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
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.
| - Post 11 of the topic "craker crumbs - Tips & Tricks with M" in the Mission Authoring forum.
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. _________________ Warfare Incorporated Former Head of Administration || Steam username: WINate
Last edited by N@TE on Mon Dec 06, 2010 8:58 pm; edited 2 times in total |
|
Back to top |
|
|
galm ForeRunner
Joined: 18 Oct 2009 Posts: 2382 Location: New York
|
Posted: Thu Oct 07, 2010 7:51 pm Post subject: |
|
|
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. _________________ "All held the finite and infinite as unrelated. None could foresee that the history of the two would become one." |
|
Back to top |
|
|
|