<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=Lever%2C_switch%2C_2-way_target_sets</id>
	<title>Lever, switch, 2-way target sets - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=Lever%2C_switch%2C_2-way_target_sets"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Lever,_switch,_2-way_target_sets&amp;action=history"/>
	<updated>2026-05-14T06:38:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Lever,_switch,_2-way_target_sets&amp;diff=10329&amp;oldid=prev</id>
		<title>Fidcal: New page: &#039;&#039;written by Fidcal&#039;&#039;   ==Introduction==  Here is a way to make one lever trigger different targets depending which way it is thrown. it would also work with any switch or say a door so yo...</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Lever,_switch,_2-way_target_sets&amp;diff=10329&amp;oldid=prev"/>
		<updated>2010-07-25T06:53:26Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;#039;&amp;#039;written by Fidcal&amp;#039;&amp;#039;   ==Introduction==  Here is a way to make one lever trigger different targets depending which way it is thrown. it would also work with any switch or say a door so yo...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;written by Fidcal&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
Here is a way to make one lever trigger different targets depending which way it is thrown. it would also work with any switch or say a door so you get a different effect when it is opens to when it closes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
The method works by relaying the lever&amp;#039;s triggering through two counters which are put out of sync by another temporary counter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to set up the lever==&lt;br /&gt;
&lt;br /&gt;
* Create three trigger_count entities, C1, C2, and C3.&lt;br /&gt;
* Both C1 &amp;amp; C2 you give the property/value: repeat 1 but C3 you give repeat 0&lt;br /&gt;
* Both C1 &amp;amp; C2 you give the property/value: count 2 but C3 you give count 1&lt;br /&gt;
* C1 targets one set of targets (say Light 1 in a test)&lt;br /&gt;
* C2 targets the other set of targets (say Light 2 in a test)&lt;br /&gt;
* C3 targets C2&lt;br /&gt;
* 1 lever targets all 3 trigger_count entities, C!, C2, &amp;amp; C3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The resulting effect of the lever setup==&lt;br /&gt;
&lt;br /&gt;
Imagine a setup with two test lights, Light 1 and 2.&lt;br /&gt;
&lt;br /&gt;
But either light could instead be any number of different targets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You push the lever forward.&lt;br /&gt;
&lt;br /&gt;
Light 2 toggles on/off but Light 1 is unaffected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You pull the lever back.&lt;br /&gt;
&lt;br /&gt;
Light 1 toggles on/off but Light 2 is unaffected.&lt;br /&gt;
&lt;br /&gt;
... and so on. Only one target (or set of targets) is affected when you push the lever forward. A different target is affected when you pull the lever back.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
You don&amp;#039;t need to read this to get it to work. You only need to know [[#How to set up the lever]]&lt;br /&gt;
&lt;br /&gt;
trigger_count entities count down from their count value but don&amp;#039;t relay the trigger on to their own target(s) until the count reaches zero.&lt;br /&gt;
&lt;br /&gt;
If the trigger_count entity also has repeat 1 set then after reaching zero and triggering its target(s) it resets the count value back to the original spawnarg value. But if repeat was 0 then it only triggers its target(s) once then does nothing further (a bit like trigger_once except after a count.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This is what happens in detail:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
You push the lever forward:&lt;br /&gt;
* It decrements counter 1 from 2 to 1&lt;br /&gt;
* It decrements counter 2 from 2 to 1&lt;br /&gt;
* It decrements counter 3 from 1 to 0&lt;br /&gt;
* Counter 3 has reached 0 so it triggers counter 2&lt;br /&gt;
* This puts counter 2 out of sync with counter 1&lt;br /&gt;
* Counter 3 has repeat 0 so is not used again&lt;br /&gt;
* So counter 2 has been decremented from 1 to 0 &lt;br /&gt;
* So Counter 2 toggles Light 2 on/off&lt;br /&gt;
* Counter 2 has repeat 1 so it resets count to 2&lt;br /&gt;
* Net result when lever pushed forward is that Light 2 is toggled on or off but Light 1 is unaffected.&lt;br /&gt;
&lt;br /&gt;
You pull the lever back:&lt;br /&gt;
* It decrements counter 2 from 2 to 1&lt;br /&gt;
* It decrements counter 1 from 1 to 0&lt;br /&gt;
* So Counter 1 toggles Light 1 on/off&lt;br /&gt;
* Counter 1 has repeat 1 so it resets count to 2&lt;br /&gt;
* Net result when lever pulled back is that Light 1 is toggled on or off but Light 2 is unaffected.&lt;br /&gt;
&lt;br /&gt;
You push the lever forward:&lt;br /&gt;
* It decrements counter 1 from 2 to 1&lt;br /&gt;
* It decrements counter 2 from 1 to 0&lt;br /&gt;
* So Counter 2 toggles Light 2 on/off&lt;br /&gt;
* Counter 2 has repeat 1 so it resets count to 2&lt;br /&gt;
* Net result when lever pushed forward is that Light 2 is toggled on or off but Light 1 is unaffected.&lt;br /&gt;
&lt;br /&gt;
and repeats. Each throw of the lever only one light is affected. This could of course be any number of different targets on each of counters 1 and 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Fidcal</name></author>
	</entry>
</feed>