[Tutorial]Walking Over AND Under Bridges(Crypt Tested)

OmnifasOmnifas Posts: 3,442 ✭✭✭
edited July 2010 in Levels
Just because the developers didn't put it in, doesn't mean it's impossible

Credit for the find goes to Hellscream who mentioned the method Here: viewtopic.php?f=6&t=8513&p=82333#p81989
  • Note: This is only Tested to work in Crypt, but the concept can be applied to the other tilesets. Built Pieces such as the premade bridges DO NOT Work with this tutorial.
  • Note 2: This can also be applied to work with doorways, if you need help with this feel free to ask[/b].

Things this will use:
Property Nodes(Type:Path Occupation Box)
Player Box Triggers
Logic Groups
A Self Built Bridge

Completed Project Layout File:(Intended only as an example)
http://www.mediafire.com/file/zmdkmudzz ... ect.layout

Creating the Play Space:
Note: You can use the one in the Layout File I provided and skip this step, just delete everything not in the Room Pieces Folder
(FINISH READING ENTIRE SECTION BEFORE BEGINNING) First you need to create an area to play in, create a small map with an accessible upper level with a bridge crossing. You however cannot use any of the bridge pieces found in the BRIDGE category. You must build the bridge with floor tiles(by default you can walk under them), railings, and selected pieces from the BRIDGE category(bridgesmall_transition_01 and bridgesmall_straight_01).

Now I told you to finish reading for a reason, the Rails and (bridgesmall_transition_01 and bridgesmall_straight_01) pieces NEED to be set at:
COLLISION ENABLED: FALSE, this will make them "passable".

Creating Collision/Passability:
When you have your play space, create a Property Node with the TYPE of Path Occupation Box, make it so it'll cover the ENTIRE Line of Railings. Clone that Property Node(Shift-Arrow) and drag it to cover the ENTIRE opposite side of Railings. Set both to ENABLED: TRUE

Now Create a Player Box Trigger Under the bridge, make it big enough that it'll cover the entire area under the bridge, and a little under the floor to be safe. Your Progress should look similar to this now:
exampleyr.jpg

Now we need a Logic Group to Switch between Collision and Passability, Create a Logic Group, having the following Logic:
logicexample.jpg
UPDATE: After further testing, I noticed that sometimes the logic didn't process for one of the path occupation node, to remedy the issue, I created two logic Groups, one for each.
Whenever you go into the Player Box Trigger the Path Occupation Box Node will disable, removing Collision from it, so you can pass through it. Once you leave the Player Box Trigger it once again will enable. Creating the Collision, so you can't pass it.

Testing:
Test the collision by going under the bridge, and walking on the bridge and trying to go to the lower level from it.

Enjoy a new dimension of Map Creation! now that you can create a bridge which you can go over and under.

Comments

  • OmnifasOmnifas Posts: 3,442 ✭✭✭
    Optional Additions:
    Hide/Show Bridge:
    If you are more organized than me, and separated the bridge pieces from the rest of the map(in its own group),you can even make the bridge disappear when you go into the Player Box Trigger.

    This section I assume you have the bridge pieces in a Group of its own. Select the Bridge's Group, in its properties set BAKE to False, this will allow you to hide/show the pieces in that group.

    now drag 2 copies of the bridge's group into the logic group you made in this tutorial. One will have an input of Hide, this one is connected to the Triggered Player Box Trigger Output(the top one in the logic editor screen of this Tutorial). The Other will have an input of Show, this one is connected to the Deactivated Player Box Trigger Output(the bottom one in the logic editor screen of this Tutorial).

    Now if you walk into the Trigger it'll hide the bridge so you can seen your character.

    My Pet is an idiot:
    Further Testing I realized my pet sometimes couldn't keep up and would wander below me when I was on the bridge.

    Create a Box Trigger on each end of the bridge(just before walking across bridge), and a Game State Controller.

    Now create a Logic Group:
    petstupid.jpg

    This will ensure that you pet is with you when you cross the bridge.
  • Aside from the issue of the pet AI not reaching you correctly, it seems rather nice.
    However, is there a way to setup pet AI waypoints instead of automatically warping your pet to you?

    And how exactly do monsters interact with the bridge, as well as loot?
    TL2 Dwarven Class Mod Discussion
    Current Goal: Milestone 1 - Model Insertion
    Status: Looking for Modelers and Animators.
  • OmnifasOmnifas Posts: 3,442 ✭✭✭
    The pet did react to the Pathing Nodes I placed but it reacts in a bad way, instead of going to the node, it goes to a certain point then freezes(but the freeze could be due to the pathing node still being enabled).

    As for Monster AI sadly they'll act as if the Path Occupation box(POB) is a wall and follow you along the bridge on the lower level, they however can follow you onto the bridge and if you say were an Alchemist and teleported to the lower level, with a jump down region they'll jump down(only some mobs). They react similar to the pet with a pathing node just a little different.

    However it seems they clip thru the POB on the south side if they are dropping from the upper level.

    Sadly this is mainly a cosmetic design tool, monsters are gonna at the way they act since they were programed mainly for single layer maps.
  • JessterJesster Posts: 25
    Something I ran into, not sure if I did something wrong. Was that as the rails were set at No-Collision if the player walked over the bridge before walking under it to trigger the initial on/off you could end up walking through the railings onto the path below. I just made a quick fix by putting another trigger box on top of the bridge that only had the function of enabling the collision so that you couldn't walk through.
  • Omnifas wrote:
    Optional Additions:
    Hide/Show Bridge:
    If you are more organized than me, and separated the bridge pieces from the rest of the map(in its own group),you can even make the bridge disappear when you go into the Player Box Trigger.

    This section I assume you have the bridge pieces in a Group of its own. Select the Bridge's Group, in its properties set BAKE to False, this will allow you to hide/show the pieces in that group.

    now drag 2 copies of the bridge's group into the logic group you made in this tutorial. One will have an input of Hide, this one is connected to the Triggered Player Box Trigger Output(the top one in the logic editor screen of this Tutorial). The Other will have an input of Show, this one is connected to the Deactivated Player Box Trigger Output(the bottom one in the logic editor screen of this Tutorial).

    Now if you walk into the Trigger it'll hide the bridge so you can seen your character.

    Good work, this helps a lot. Do we have any way to make the folder of objects fade to invisibility rather than being either visible or invisible?
  • OmnifasOmnifas Posts: 3,442 ✭✭✭
    This isn't a Logic that allows for fading; however, I haven't really played around with timelines yet, but I doubt there is a fade option in there either.
  • Note: I used spoilers to save space.
    Omnifas wrote:
    ...Create a Logic Group, having the following Logic:
    logicexample.jpg
    UPDATE: After further testing, I noticed that sometimes the logic didn't process for one of the path occupation node, to remedy the issue, I created two logic Groups, one for each.
    The visual logic for having a Bridge that you can walk over and under, and have its visibility manipulated can also be expressed this way:
    vislogbridge.jpg

    Awesome Tutorial! :D
    “Before you criticize someone, you should walk a mile in their shoes. That way when you criticize them, you are a mile away from them and you have their shoes.”

    —̶̶̶ḂJack Handey
  • wolfnovawolfnova Posts: 10
    This idea is of course, just in theory, as it would probably be too much to add XD

    So, in *theory* would you be able to add 3RD and 4TH layers, (as in, make traversable mountains, bridges on multiple levels, and bridges from one 'mountain' to another? If so, combine it with, the post of bridges going invisable, and the pet warp, and probably some changes to the main part, to allow free flowing monsters, and not have them boxed in with the Path Occupation Box's, and if it would be possible, it would open up quite a bit of possibilities, if it was possible to accomplish it.

    (Yes, I am kinda crazy for mentioning it, so ya...)
  • DemenzaDemenza Posts: 6
    I got it to work, with bridge room pieces. Right now actually. :D

    Here is how. Simply instead of taking two nodes, just have one. And expand it. Over the entire area. You want to "deactivate", and when "activate" when you are outsite the box.

    Is working atleast, with another bridge underneath the other.

    Click here, to watch entire picture. If your resoultion is to low.

    torchedbridgespassable.png
    Best Regards

    Daniel
Sign In or Register to comment.