Switches Assets

Switches

Generic Switches

  • OCB 0: Wall Lever
  • OCB 1: Small lever
  • OCB 2: Small button
  • OCB 3: Big Button
  • OCB 4: Giant Button
  • OCB 5: Valve
  • OCB 6: Reach In Hole
  • OCB 7: Lua Switch. Use this OCB on a switch where you want to have two custom animations. Use in conjunction with ItemFlag[4] for the ON animation and ItemFlag[5] for the OFF animation:
 
-First, we will create a function for the amendments we want for this new custom switch: 
function customisedSwitch()
	local customSwitch = GetMoveableByName("lever_switch_40") -- Get which switch you want to add custom animations to.
-- The next section is where we define the two animations 
	local switchOn = 100 -- Lara's Animation number
	local switchOff = 200 -- Lara's Animation number
-- Finally we will change the code to link up the animation changes to the switch.
	customSwitch:SetItemFlags(switchOn,4)
	customSwitch:SetItemFlags(switchOff,5)
end
-- Now we have the function, we can ask the engine to run it when the player loads the level. 
LevelFuncs.OnStart = function()
	customisedSwitch()
end
-- code: Stranger1992. 19/03/24

Users can assign custom animations to a switch:

  • OCB = Animation number for “on” animation
  • OCB + 1 = Animation “off” number.
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated
New
Updated