OCB Codes


On this page you can find a lot of ocb codes for objects in the Tomb Raider level editor. In order to understand this document, please read these instructions. Objects are sorted into groups. Each object has it's own frame. The name is listed in bold. Some objects have multiple slots. If these work the same, the number is replaced by x. Sometimes multiple names are shown. This means these objects must be combined or they work the same.
Below the name are, if available, instructions listed in italic. Below the instructions are the possible ocb codes. Codes in black text are the base code. You can only use one of these codes. Codes in red must be added to the base code. You can use more of these codes by adding the all values to the base code.

Enemies

BADDY_x
Also needs MESHSWAP2 (baddy 2) or MESHSWAP3 (baddy 1) in the wad.
0 - Normal
1 - Roll to right when triggered
2 - Jump to left when triggered
3 - Start ducked when triggered
4 - Climb up 4 clicks when triggered
10 - Unlimited uzi ammo
Dog
0 - Normal
1 - Lay Down until triggered
 LITTLE_BEATLE
Enter number of scarabs you want in the ocb and add one of the following values:
1000 - Scarabs come out of the floor
2000 - Scarabs fall from the ceiling
 

 

Doors, switches and puzzles

SEQUENCE_SWITCHx and SEQUENCE_DOOR1
You must place the 3 sequence switches in the map (1 click above the floor) with the following ocb codes:
0 for SEQUENCE_SWITCH1
1 for SEQUENCE_SWITCH2
2 forSEQUENCE_SWITCH3
Below each switch must be a switch trigger for itself. No other triggers needed.
Place 6 SEQUENCE_DOOR1 objects in the map with ocb values of 0-5. Press the buttons 1-5 in the ocb window to activate the door. Place a trigger for the door behind it. This will close the door and reset the switches. Doors can only be opened once!
The game will open a SEQUENCE_DOOR1 when all 3 switches are pressed. The first time you must press them in the order 0-1-2. This will open door 0 and resets the switches. If the first combination pushed is not 0-1-2, door 2 will open. The switches only reset after triggering the door. If the combination 0-1-2 is not pressed and door 2 has already been opened, the switches will reset themself when lara presses another combination. After the combination 0-1-2 is pressed, all other doors can be opened by their combinations:
0-1-2 opens door 0
0-2-1 opens door 1
1-0-2 opens door 2
1-2-0 opens door 3
2-0-1 opens door 4
2-1-0 opens door 5
When door 1-5 is opened  the switches will only reset if the door closes. Door 0 will reset the switches when it opens.
PUZZLE_HOLEx
Puzzle holes are activated if lara stands before, the player pressed action and selects the correct PUZZLE_ITEMx. With some ocb codes you can have special anims.
0 - Default animation will play and PUZZLE_HOLEx is replaced by PUZZLE_DONEx
999 - Same as 0, but allows Lara to walk though the PUZZLE_DONEx
< 0 - Play lara anim. Enter the negative number of an animation of Lara in the ocb and that animation will play when lara inserts the puzzle_item.
> 1024 - Play cutscene. Add 1024 to the cutscene ID and this cutscene will start as soon as Lara inserts the puzzle_item.
DOOR_TYPEx
0 - Opens when triggered
1 - Combined with COG_SWITCH. Door raises on every turn of the cog and lowers itself when the cog is released.
2 - Can open with crowbar.

Special effects

FLAME_EMITTER
0 Normal big flame
-1 Shoots flames upwards with brakes.
-2 Shoots out flames to the side without brakes.
-3 Shoots out flames to side with brakes.
-9 Shoots flames upwards with very short brakes.
FLAME_EMITTER2
The flame emitter 2 normaly shows the flame not in the middle of the sector, but in the edge where the back side of the NULL mesh is pointing to.
0 Normal small flame.
1 Even smaller flame
2 Flame moves on the floor in the direction of the point of the NULL mesh
123 Like ocb 0, but in the middle of the sector.
FLAME_EMITTER3
888 Big ball of lighting that follows Lara.
 

 

Other

TWOBLOCK_PLATFORM
Place a DUMMY trigger from 2x2 sectors on the floor below it (so if there is a door below it, go to the lowest room).
In the OCB enter the height (in clicks) it must go multiplied by 16. Add the speed to this value (range 0-15).