PDA

View Full Version : Background Triggers


CrimiClown
Sep 25, 2005, 02:56 AM
I've just read this article (http://www.jazz2online.com/J2Ov2/articles/view.php?articleID=279) about background triggers. I fully understand, and it works, too.
One slight problem though...

If I am out of the screen in which the 4 trigger sceneries are (Top left corner, as recommended by the article) the trick doesn't work. Does anyone know how to fix this?

~CC

CrimiClown
Sep 25, 2005, 03:04 AM
I also found out that it MIGHT fail if you go below tile Y=20... It sometimes works upto tile Y=25, but if you go back to another height, it fails untill you are at tile Y=20 again...

Edit: Oops, double post, sorry...

Edit2: Also works untill X=20, same story.

blurredd
Sep 25, 2005, 09:01 AM
Violet was supposed to update his article (or at least the one on JCSref) some while ago.

CrimiClown
Sep 25, 2005, 10:54 AM
Hmm... suprises me he didn't... To me, he is one of the most active people on the JCF... :(

blurredd
Sep 25, 2005, 01:22 PM
Alright, so I sent this message to Violet on June 19th in hopes that he would update his article (http://www.jazz2online.com/jcsref/node.php?node=66&mode=id&menu=topics). I might as well post this here in the meanwhile because "background triggers" have more uses than just in the background and the effects apply to all types of scenery events (see my Fortress of Fate (http://www.jazz2online.com/jdc/levels.php?ext=eventlevels/Assault/) Assault level). So here's the original message slightly edited:

Let me see if I can explain this. For starters, a level in JJ2 can be divided into 4-tile wide segments starting from the top left. Information on what's in each segment is saved, which is probably done to save memory and reduce file sizes. Anyway, take a look at this.

http://www.jazz2online.com/d3/stomp4x1.png

This scenerio would work perfectly fine, assuming an animation for ButtStomp Scenery was used. Identical sets of 4 tiles are needed, and flipped tiles count as different tiles. Keep in mind that each set of tiles must fit into a 4x1 segment in JCS.

In the same layer, the set of tiles furthest up and/or left (even with no scenery events) affects all other identical sets of tiles that have no events on the animating tiles (just so you know, you can use any event other than scenery events on tiles that aren't animations with no ill effects). Higher layers dominate lower layers, so if an identical set of tiles was in a foreground layer, it would prevent the set of tiles in the sprite layer with scenery events from affecting any other set. If you want to use scenery events in background layers, it doesn't matter which 4x1 segment you use.

Tell me if you have any questions since I probably didn't do the greatest job on explaining this.

Violet CLM
Sep 25, 2005, 08:20 PM
Unfortunately, blur, that's not quite related to the problem at hand. (Regarding the article, I would probably update it if I was more interested in doing so.)

If you are playing in Single Player, nothing that is more than 31 tiles away from the player will be kept track of. Enemies and bosses will regain full health, objects that came out of crates will disappear, and trigger scenery will fail to activate. This last one is usually no problem as it does activate once you come close enough to the tiles, and this happens before you even see the tiles, so on average you will never know there is a delay. The background trigger thing, however, displays the effects of trigger scenery in locations other than the actual tile they are placed in. Thus, to trigger background layers in Single Player, you must be within 31 tiles of the actual trigger scenery events in order to see the effects of the trigger.

CrimiClown
Sep 25, 2005, 09:27 PM
So... In other words...

Imagine that I would use a different background (Black to blue) in layer 8, using the technique described in your artice. This would mean I HAVE TO BE within that 31 tile range for it to work. But in this technique, I use the top left segment. If I'd use another 4x1 tile segment, closer to the point where I want to activate the background trigger, would it work?

Violet CLM
Sep 25, 2005, 09:43 PM
As its a background layer, yes, placing the starter tiles anywhere in layer 4 should work fine. It's only when you try to be able to trigger it in multiple places that things get complicated.

CrimiClown
Sep 25, 2005, 10:36 PM
Ok. That's all. Just to make sure, I'll tell you my plan:

Just like in Rainy Graveyard (I think it's called that) I want to let lightning struck as you walk in the final room. So, a couple of switch-on triggers would work, I guess. So this will work as I move the original 4 triggers to, let's say, in the floor, covered by some layer 3 tiles. To my knowledge, this should work now. Am I right?

Thanks.

Edit: I tried doing this but it still doesn't work. If anyone could please make an example level of the above explained concept, that'd be helpfull.

So:
Just a long pathway, without lightning. After 50 tiles or so, enter a building, and lightning comes.

If anyone could create this effect to show me how it's done, I'd be very gratefull.

~CC

Violet CLM
Sep 26, 2005, 12:10 AM
Ok. That's all. Just to make sure, I'll tell you my plan:

Just like in Rainy Graveyard (I think it's called that) I want to let lightning struck as you walk in the final room. So, a couple of switch-on triggers would work, I guess. So this will work as I move the original 4 triggers to, let's say, in the floor, covered by some layer 3 tiles. To my knowledge, this should work now. Am I right?
Are they the proper four tiles?

CrimiClown
Sep 26, 2005, 04:21 AM
Yep. I'm sure of it, that they fit in the four tile segment, as described in the image above... :( (Blur's post)

Edit: I'll send you the level, maybe you can see what went wrong...