MCE's - why and how
NOTE: This article is obsolete. For a more detailed explanation of the phenomenon described read Event Theory instead.
(This article finishes with a demonstration of how to make MCE's only two tiles wide. If this interests you, but you don't feel like wading through the rest of the article, just skip down to the bottom and look at the pretty picture.)
December 25th, 2004, marked the sixth anniversary of Jazz 2 City posting instructions for making Multiple Combo Events, also known as MCE's. It's about time an article like this got written.
The original MCE was much more complicated than the ones we use today, and it looked like this:
J2C had a detailed list of what each event should be and exactly what parameters you give to it and which should generate and which should not. The short version is that P stands for Pulze Light, E for Echo, B for Belt Left and L for Lizard. Can you imagine memorizing all eight events, their positions relative to each other, and all their parameters? Sheesh! Fortunately, someone (Overlord? I'm not sure) noticed that only three of those events were needed, and that somebody had probably just been messing with our heads. As a result, all that's needed for a working MCE is this:
Overlord's tutorial gives you a detailed explanation of how to use this standard form of MCE, showing that you can reverse its direction, and other stuff. But thanks to a new accidental discovery by AEaeUO, Overlord has become somewhat incomplete. We have been using MCE's for six years now! It's time to understand why they work and exist. And before we can understand that, I'm going to have to explain a little-used event known as "Generator". Those of you who already understand the generator event can skip ahead to the next section, which is called Belt Teleportation. Yes, belts again. Aren't belts great?
(note: for the purpose of this article, I am going to be differentiating between "Events" and "Objects". "Events" are things you place in JCS with instructions. "Objects" are what is actually created by the events.)
The Generator Event
If you look in your JCS.ini, you'll see that Event 216 is something called "Generator". It has two parameters, Event and Delay. Generator is not a normal event, as it will not appear in the main list no matter how you edit JCS.ini (you may notice that I tried to put it into Gameplay Modifiers, an attempt which failed), but a generator event is created every time you ask JCS to make a respawning object. A little thing in the top left corner of the event name appears to indicate that you have placed a generator event, and then it uses the name of the object you want to generate. There is no real explanation for how this works other than that JCS is just built to give special attention to Event 216.
The reason for this is that when you want a generating event, JJ2 does not just take a normal event and say "Hey, if you're destroyed, reappear". Instead, it makes the special generator event and gives it two parameters - which object should be generated, and how long the delay is. No more, no less. A few generatable objects manage to sneak in other parameters somehow - Trigger Crate is always TriggerID 31 when generating, and Spike Bolls use the Delay value for all of their parameters - but for the most part, you are unable to set anything for the generating object. A shame, but that's the way things work, and you don't seem to be able to change that by adding more parameters to Generator in JCS.ini.
(If you want to look at a generator event not actively involved in the process of creating something, create a normal generating event and change the EventID to 216. The non-generating generator has some fun features like temporarily disabling JJ2's ability to create new objects, which can be fun when you're fighting Bilsy and he's unable to actually create any fireballs.)
Those of you who are familiar with my work, or are just over-curious in JCS, may already know that most events can be moved by the Belt and Acc Belt events. Some events can be moved better than others - spike bolls have very strange belt support indeed - and one of the worst at properly moving is the Generator event. Generator's imperfect handling of belts causes the generator event to be split into two halves - the generator itself, and the parameters (Event and Delay). The parameters stay in the tile you placed the generator event, unattached to anything, and this strange occurance creates a black hole of sorts. Any normal events moving along the belt will fall into the black hole when they reach it and reappear wherever the main component of the Generator event ended up. Consider the below picture:
When Apple C is moved onto Tile B, it will be teleported instantly to Tile A, which is where the generator event ended up. In the case of the above image, the generator was jumped about three tiles ahead, being set to create a Red Spring. Among the other "Event" settings for Generator which work this way are Green Spring, Blue Spring, and Lizard. I'll explain that later, but for now, keep reading.
This trick in itself is actually pretty cool, by the way. It essentially allows events on belts to skip over masses of events which otherwise would end the belt. Sadly, it doesn't work on Jazz, but did you really expect it to? Moving on, let's see why else you should care about this odd quirk of generators and belts.
Tieing it all together - MCE's
Ok, as the generator event can have parameters other than just red spring, a basic belt teleporter can look like this:
Look familiar? Yep, it's two of the three events used in an MCE. The third event, Pulze Light (more on that later), is placed in the tile that moving objects such as apples would reappear, but more importantly, it is placed in the tile that the parameterless Generator event has been moved to. Because the generator wants to be able to generate stuff, it hunts around for its parameters, and logically it takes the parameters from the tile that it's in. Logically, this "Speed" parameter must be the object it's supposed to create, and "Sync" must be the delay! In the case of the MCE I showed you at the start of this article, the created object will be #21, aka smoke rings. But, there's one little problem with this.
A complicated process has been employed to create that smoke ring. A generator event must split in two, create a black hole, reappear on another event, take the parameters from that other event, and create an all new object based on those parameters. Unfortunately, one vital step was omitted during this, and that was finding the correct sprites from the anims.j2a library. For the purpose of saving memory, JJ2 only loads the sprites it needs to for each individual level (if you have too many different objects, it will get an amnesia error). In this case, JJ2 hunts around for a digital memo telling it where to find the sprites used for smoke rings. It fails, and uses an airboarding Jazz sprite instead. This particular sprite confusion can be fixed by including a Caterpillar event elsewhere in your level, by the way.
Modifying your newly understood MCE
MCE's are surprisingly customizable. All three events used can be edited a great deal:
PULZE LIGHT: Pulze Light may be replaced by any event with at least one parameter, and preferably two. The most common event I've seen used instead of Pulze Light is Buttstomp Scenery, but this can be annoying because the the actual event you place is still there in the level. Rotating Rock is another candidate, and it's kind of fun to have weird MCE effects coming out of an enormous round boulder, even if doesn't make any sense. Just be careful which event you do use, as some events will have limits on how high their parameters can go - Pulze Light, for example, only supports respawn speeds ("Sync") of 15 or lower.
BELT LEFT: The belt used for an MCE can be either a normal belt or an Acc belt, and it can move in either direction, depending on where you want the parameter event (Pulze Light/whatever) to be relative to the generator event. The belt speed doesn't matter.
GENERATOR: Although it has to be a generator, the original "Delay" setting doesn't matter, and the object it's supposed to generate (note that it never does create that original object) can actually vary a great deal. The actual distance the generator event (sans parameters) is moved depends on what number is used by the event the generator is told to generate. For example, Event #100 would move the event 100 pixels in the direction of the belt. At #128 it restarts and begins moving in the opposite direction of the belt. (Tiles are, for reference, 32 pixels wide.)
How does that help you? Well, if you're having trouble fitting your MCE into a mass of other events, it helps a great deal. I have long been annoyed by how big the standard MCE is, and I am quite glad that there is now an alternative. Here, in all their glory, are a couple of two tile wide MCE's.
On a final note, belt teleportation can also be used as eyecandy. Put the below image into a level, cover up the walls with layer 3 and maybe add some blinking lights or something. You have a quite decent cloning machine.
Added on: 4 February 2005 00:07. Made by Violet CLM.