www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Next Generation Level Editor

Reply
 
Thread Tools
Old 08-12-20, 08:11   #1
Craig Michaels
Archaeologist
 
Craig Michaels's Avatar
 
Join Date: Feb 2006
Location: Berkeley, California
Posts: 1,280
Default Traversable Tree Branches

I need some help figuring out scripts, triggers, and bridges. I've been trying to dream up a way to make tree branches that 1) Lara could grab and stand on, but 2) looked more realistic than using room geometry like TR3.



I posted my idea in the Object Request Thread, but began trying to make them myself. I started by modifying a branch from Level NextGen's Wild Trees so it had a flat section 2 clicks wide by 4 clicks long:



And then cutting a transparent bridge_flat in half so it is only 2x4 clicks rather than 4x4:



Once I added the branch and bridge object, and removed the branch's collision, it's halfway working.





Now, I think I need to learn how to make the bridge_flat object only support Lara on half the square rather than the whole square, and could really use help figuring this out. I have read Paolone's Bridge collision tutorial, but I'm confused and don't know where to start - I'm afraid I have no experience coding scripts. There are two things I still want to accomplish.

1) How can I make Lara stand only on the narrow branch and fall if she leaves it?


2) How can I prevent Lara from shimmying around the side of the bridge? Could I use another transparent object to block her way perhaps?
__________________
Archaeologist in Berkeley, CA

Last edited by Craig Michaels; 08-12-20 at 08:12.
Craig Michaels is offline   Reply With Quote
Old 08-12-20, 15:36   #2
Krystian
Archaeologist
 
Join Date: May 2010
Posts: 1,110
Default

1) For narrowing the bridge, you must use so-called fragmented triggers of NGLE.

Take a look at the image of the tutorial you've brought up:



What fragmented triggers do (generally speaking) is they overlap with pre-existing triggers on a square and make it so the triggers are activated only if Lara is over the green areas and not the white (if you've ever used image editing software like photoshop, it works kind of in a similar way that masks do for image layers).

Bridges don't work of course simply plopped into the level. So to enable their collision, you must use either dummy triggers, or simply set a normal trigger (like for triggering doors). Both of these will have the same effect, making the bridge walkable for Lara.
What happens if you combine the square trigger for a bridge with the masking properties of the fragmented triggers? You will get a fragmented bridge. Meaning that the green areas will allow Lara to stand on them, while when crossing over the white, she will fall down.

There are several different kinds of fragmented triggers for creating different shapes. Luckily, this kind of shape (a strip of well-defined width in terms of the whole sector length) is probably the easiest to achieve. To find them, open the trigger panel, in the trigger type menu select ConditionNg. Next, in the timer field, you need to look for Fragmented Trigger (you can also use the seach function to locate them faster). From what I can see, you would like to make the width of the branch/bridge a half of a sector. For this you will need the trigger:
Code:
Fragmented trigger. Check in (E) way if lara is in <#>fragment of 2x2 sector grid (C6)
The 2x2 sector grid is exactly what it sounds like, dividing a sector into 4 (2x2) squares:


The nomenclature used in the descriptions of these triggers is the following:


(ty Daniel for letting me steal this xoxo)

This will hopefully give you idea which of the options to pick to get the right side of the bridge to have collision (else you would get it on the other half, where there's no branch).

So you will need the horizontal or vertical strip options to match the bridge collision with the branch. For something simple like this, no scripting is needed and it's enough to place it over the trigger for the bridge that's already there.
An example fragmented trigger for modifying a bridge is the one below:



According to the image from earlier, with this particular trigger it will be the west-half of the sector that will have collision. For other halves, you just switch between vertical and horizontal, "1th" and "2th"

------------------------------

2) Yes, it would be best to use an invisible object to block Lara from shimmying around the "corner" of the bridge in this situation

Last edited by Krystian; 08-12-20 at 15:39.
Krystian is offline   Reply With Quote
Old 08-12-20, 20:56   #3
Craig Michaels
Archaeologist
 
Craig Michaels's Avatar
 
Join Date: Feb 2006
Location: Berkeley, California
Posts: 1,280
Default

Quote:
Originally Posted by Krystian View Post
1)
For something simple like this, no scripting is needed and it's enough to place it over the trigger for the bridge that's already there.
An example fragmented trigger for modifying a bridge is the one below:

Thank you so much Krystian, this was incredibly helpful and exactly what I needed to get it working! I've got exactly what I was looking for now, thanks to your detailed instructions. I really appreciate it!

__________________
Archaeologist in Berkeley, CA
Craig Michaels is offline   Reply With Quote
Old 08-12-20, 21:15   #4
disapearing-boy
Archaeologist
 
disapearing-boy's Avatar
 
Join Date: Oct 2006
Location: Čire
Posts: 2,331
Default

I'd like to mention that the size/shape of the bridge_flat object is irrelevant and will not affect the collision at all. You can use the same bridge object for different size branches - if you want to make more than one size branch you can.

The trigger alone changes the boundaries.
__________________
"Never sigh for a better world, it's already composed, played and told..."
disapearing-boy is offline   Reply With Quote
Old 08-12-20, 21:29   #5
Joey79100
Professor
 
Joey79100's Avatar
 
Join Date: Mar 2012
Location: France
Posts: 3,380
Default

I also want to add that the fact that horizontal is vertical, and vertical is horizontal is because of historical reasons.

Winroomedit/NGLE had suffered a weird design choice: it had different cardinal directions than the game.
The actual North that you see in game was the left (west) side of the 2D Map in Winroomedit. When TRNG was developed there was no TE, so every trigger description was written with Winroomedit cardinal directions in mind.

TE fixes those cardinal directions by default, so there's a 90° difference. This explains why "horizontal" strips described in the bridge triggers are vertical in TE, and vice-versa.

Last edited by Joey79100; 08-12-20 at 21:30.
Joey79100 is offline   Reply With Quote
Old 08-12-20, 21:37   #6
Craig Michaels
Archaeologist
 
Craig Michaels's Avatar
 
Join Date: Feb 2006
Location: Berkeley, California
Posts: 1,280
Default

Quote:
Originally Posted by disapearing-boy View Post
I'd like to mention that the size/shape of the bridge_flat object is irrelevant and will not affect the collision at all. You can use the same bridge object for different size branches - if you want to make more than one size branch you can.

The trigger alone changes the boundaries.
Oh good to know! Ok, that definitely makes a difference in terms of the number of objects I'd make. I'm excited to finally have tree branches that really look like tree branches! Are there any levels where this has been done?

Quote:
Originally Posted by Joey79100 View Post
I also want to add that the fact that horizontal is vertical, and vertical is horizontal is because of historical reasons.
I'd heard this before but it's helpful to read exactly how it affects the bridges, thanks for that. Now that I've got it working the way I'd imagined, I'm going to start experimenting some more. I want to learn how to get started editing room geometry so I can make the tree trunks themselves smoother without using objects, since the trees extend to multiple rooms. However, now that the branches can be bridge objects rather than geometry, that means there doesn't have to be a new floor-ceiling door every time there's a new branch!
__________________
Archaeologist in Berkeley, CA
Craig Michaels is offline   Reply With Quote
Old 08-12-20, 21:56   #7
Joey79100
Professor
 
Joey79100's Avatar
 
Join Date: Mar 2012
Location: France
Posts: 3,380
Default

Quote:
Originally Posted by Craig Michaels View Post
I'd heard this before but it's helpful to read exactly how it affects the bridges, thanks for that.
I'll be honest, when reading TRNG triggers in TE, what I do is I tilt my head to the right, so I can picture how it's "meant to be".

Quote:
Originally Posted by Craig Michaels View Post
However, now that the branches can be bridge objects rather than geometry, that means there doesn't have to be a new floor-ceiling door every time there's a new branch!
Keep in mind you can have only one bridge trigger per sector. It definitely will help having more freedom with the heights, but you still have those limitations.
Joey79100 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 11:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.