This article will fully explain the capabilities of trigger zones, as well as the limitations. This will also cover what the difference between trigger zones and trigger crates is, and some general tricks you can use with trigger zones.
First off, I will explain what exactly triggers are. Triggers can be thought of as switches, where 1 represents on and 0 represents off. They are used with trigger scenery, which is basically a 2-frame animation tile (some exceptions can be applied, more on that later) where the first frame is off, and the second frame is on. Triggers are in my opinion, the most useful thing in JCS, and with a good amount of knowledge in them, you can do many more things than it seems possible to do in JCS.
Trigger Crates and Trigger Zones
I will start this off with the simpler of the two: trigger crates. Trigger crates are pretty much one time use switches that only turn trigger scenery on, but never off. While at a first look they seem more limited than trigger zones, but they have one feature that actually makes them more powerful in a way, and that is a trigger crate will affect every player in the server. Trigger zones are only local, which means that if you activate a trigger zone, it will only affect you and not the other players. Please note that a trigger crate can not have a generator applied to it, as it will not work properly.
A trigger zone, for those of you that don't know, is an invisible event that can either turn a trigger on OR off, depending on it's settings. Remember that on is 1, and 0 is off, much like binary code. I recommend you to take in mind that the "switch" perimeter is very messed up and should be avoided. One useful thing about trigger zones is that they have the ability to animate trigger scenery the first time it is activated but only the first time. The tile will start at the first frame and animate itself at 10fps to the second to last frame (not the last). That means that the final frame of the animation will be completely avoided. Animated trigger zones can be EXTREMELY useful, and one good use will be covered later in this article.
A minor nuisance is the fact that trigger zones may not have the id of 0. Crates can, but not zones. Remember that, because a trigger zone with the id 0 will never work.
More Trigger Information
There are a few important things that you should know about triggers, and specifically trigger zones. Although I said that trigger zones affect the player who activates it only, there is one exception. If the server activates a trigger, and a player joins after that, the player will adapt the status of all of the triggers the server has. So that means if trigger one and three are on, a person who joins will also have that same condition. People already in the server will be unaffected though. This only applies to people that JOIN. This can lead to problems if you do not know how to deal with it, but luckily a very efficient method of dealing with that problem is explained later in this article.
Another important thing to know is that triggers act differently in single player and multiplayer. In single player, all triggers that are on will be reset to off when you die. That does not apply to multiplayer. In multiplayer you will retain the status of the triggers activated when you die. The only way to lose them is to rejoin the server or for the game to end.
Finally, when a player joins, triggers will always be set to off for a half a second or so before the player adapts the triggers of the server. The cause of this is unknown, but it probably has something to do with the connection between the player and the server. Normally this "delay" in triggers when joining a server is no probelm at all, but it can confuse you into thinking you did something wrong if you do not know about this.
Warning: This section is only for people who know how to use JCS well. If you are still learning how to use JCS, expect to become very confused with what I am about to explain. If you do not understand this, do not ask me to help you with it, because simply put, this is the best job I can do explaining these things.
As I stated above, the player will adapt the status of all of the triggers the server has when he or she joins. Right now I will explain how to combat that, and how to do a few other nifty things. If you look at the picture below, you will see a system of sucker tubes and triggers.
It is pretty obvious, but I might as well say it. The sucker tubes all move RIGHT (that is X speed 20), and the trigger zone activates the trigger scenery. The trigger scenery tiles are not normal ones. They have a delay for about two seconds before they switch over. That means that the trigger scenery marked "Masked -> Unmasked" will STAY masked for two seconds after the player touches the trigger zone, AND THEN switch over to unmasked. This is done using animated trigger scenery. The same goes with the other trigger scenery tile.
Try and guess what this will do. If you get it right, good for you. It means that you actually understand this. This system will send a person to Room A when they join, and to Room B every time they die. So let's pretend I joined a server hosting the level shown above. As soon as I enter the server, I will be plopped into Room A. Then all of a sudden somebody ambushes me and I am killed. I might as well say goodbye to Room A, because I am now in Room B. And every time I am killed I will be plopped into Room B as well. The only way for me to get to Room A is to rejoin the server.
So how does this relate to preventing the players from adapting the triggers of the server? It is quite simple. Let's have Room A represent a sort of extension to the tube system, and have Room B represent the actual level. When the player travels through Room A, they can pass a series of trigger zones that deactivate or activate whatever is in the level. This will effectively negate the effects of the triggers that were passed on to the player when he or she joined. At the end of Room A, a warp should lead into Room B.
You can also use this concept for other, more complicated things, and a good example of that is in the level "Team Battle", which can be downloaded from the downloads section of this site. Other uses for this are up to you to find out. This is where your creativity comes into play, and unfortunately, creativity is not something that you learn. It is something you simply have. Anyway, this pretty much finishes this article up. Hopefully you understood this. Thanks to Bobby for discovering the method of using triggers that I just explained.
Added on: Thursday, February 27 5.02 pm. Made by EvilMike.