TEN.Objects.ObjID.WINSTON
The ever-faithful Winston: Lara Croft’s long time, multi-generational butler is back.
MESHSWAP_ARMY_WINSTON_OUTFIT and swap the meshes if the OCB is 1. Use the code below to do this in-game:The animations from the TR2 and TR3 version of Winston have been combined.
-- Function to swap Winston to Army meshes
local function WinstonToArmyMeshswap(winstonNormal, winstonNormalOCB)
local numMeshes = 26 -- Total number of meshes to swap
local winstonArmyID = 1120 -- Object ID number
if winstonNormalOCB == 1 then
for i = 0, numMeshes - 1 do
winstonNormal:SwapMesh(i, winstonArmyID, i)
end
end
end
-- Function to swap Army to Winston meshes
local function ArmyToWinston(winstonNormal, winstonNormalOCB)
local numMeshes = 26 -- Total number of meshes to swap
local winstonNormalID = 298 -- Object ID number
if winstonNormalOCB == 0 then
for i = 0, numMeshes - 1 do
winstonNormal:SwapMesh(i, winstonNormalID, i)
end
end
end
LevelFuncs.OnLoop = function()
local winstonNormal = GetMoveableByName("WINSTON")
local winstonNormalOCB = winstonNormal:GetOCB()
if winstonNormalOCB == 1 then
WinstonToArmyMeshswap(winstonNormal, winstonNormalOCB)
elseif winstonNormalOCB == 0 then
ArmyToWinston(winstonNormal, winstonNormalOCB)
end
end
--code: Stranger1992, 23/03/24