Introduction


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.

Advanced Stuff


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.


Comments

et on October 07, 2001 05:00

Some good facts in this article EvilMike. When I changed hard drives I had to re-setup the trigger zone. Typical that after I relearn it all and how it works, there comes a whole article about it. I guess thats just my luck. Anyway, its worth reading if you’re abit confused on how it works.

Gargoyle on October 12, 2001 05:00

Very impresive…

CannibalBob on October 14, 2001 05:00

I made something similar to that, except it’s random which room you end up in… when I actually finish the level you’ll see what it’s for… bwa ha ha ha ha…

Bjarni Cool on January 10, 2002 05:00

Wait a second. Where is trigger zone? It is no in event list! Where is it? And I have no CTF! I have only version 1.23! But sorry!

Taz on February 15, 2002 05:00

Uw…
Bjarn, CTF is Capture To Flag!
Trigger zone is normal on the event list!
:S

FQuist on May 01, 2002 05:00

Trigger events are on a special jcs.ini. You can get it at the j2o downloads, I think.

KJAZZ on May 29, 2002 05:00

Very useful. I saved to a file for easy reference. :D

American on August 05, 2002 05:00

Great article, Mike! Very well-written and insightful.

By the way, Mike and I created a new gamemode that uses this. He’s creating a level, and I’m sure it will be very spiffy (as always). :)

Ãîçk ÃR on April 19, 2005 22:35

Great article. But I didnt find out what I needed to ATM. So a Trigger Zone with onoff=1 its more like \“Switch it to 1\”. is there a way to either make it go back to 0 if you touch another trig zone or if you leave a ring of zones?

Violet CLM on April 21, 2005 02:59

<i>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>
Put some trigger zones with onoff=0.

Thomas on November 05, 2006 18:39

That is cool. I also got my one Idea when I red that trigger zones only effect the person passing thour it. In internet play make it that there are multe entrines that acces diffent platforms and walls. (It was aloght cooler in my head then on text.)

Cobra NF on July 03, 2009 12:10

i tried it but when i go on da trigger switch ,it goes on and off and on and off repeatedly….how do i fix this????????

Violet CLM on July 15, 2009 06:49

cooldude31: Set \“switch\” to 0.

Cobra NF on September 25, 2009 00:15

thnx violet ill remember that.

Spaz.Spaz.tg on December 18, 2009 07:10

which tilset did you use?ihave created an copy of that picture in space by blade tileset

Joizy on April 29, 2010 17:20

I still don\‘t understand all of it, because I\‘m not really advanced in JCS. But I had a problem: in a hotel of mine I wanted to let the hoster get acces to some places, but only the hoster. Thanks to this only the hoster got acces :D!

I\‘m really happy :3!~

Sean on October 06, 2010 09:06

Completely helpful. However, there is a bug with triggers I found while experimenting. Trigger Scenery events cause JJ2 to crash when placed on a flipped animated tile. It should be mentioned here because it took me hours to figure out the source of the error. Mentioning this would save a lot of time for JCS users who come across this error.

mr.max on November 08, 2011 19:21

hmm…good

mr.max on November 08, 2011 19:24

that\‘s good but did any one know where i download brain here to be admin in jj2 game?please!!!

bishomilad72 on July 11, 2012 08:39

can any one tell me where i can down jazz creatiotn station? please