Light Trap
In the temple there is a tunnel leading to an antechamber lit by a single shaft of light, one that has deadly consequences for blocking it. A whirring noise, a creaking sound and a sudden rush of spikes is the last thing you will see or hear. But how did it work? I liked someone’s suggestion of a water bladder type heat device but water takes way too much time to heat up using sunlight. My theory is along the same lines though.
The crepuscular-rays of light entering from the outside fall directly across the floor of the passageway. There are also crevices in the passage walls on either side of the column of sunlight. Through direct light or diffused light a simple thermodynamic heat engine powers the spikes.
The light falls directly onto or possibly refracted onto a bladder made from animal skins. The bladder contains a mixture of gas such as methane or other common gases such as carbon monoxide found in mineshafts or caves. The gases accumulate in inadequately ventilate spaces above a pillar fall because they are lighter than air and will rise and stratify if not properly diffused. The gases themselves can be deadly to explorers but in this case we will say they were carefully mined and placed in animal skin bladders carefully soaked and sealed in animal fat or pitch. The warriors may have inadvertently discovered them by exploring caverns lit by torches.
The combined gases form a proportional relationship between temperature and pressure because of constant volume in the sealed bladders. Each bladder is on a seesaw balance beam also, with an identical bladder and second beam of light in the adjoining tunnel or crawlspace next to the main shaft. Changes in air temperature or the amount of light being refracted onto the bladder changes the temperature and pressure of the mixture of the gases causing it to rise or lower. Which in turn causes the other bladder on the other end to rise or lower either more directly into the light or further away from it which causes even further tilting from pressure and temperature differences. The seesaw motion activates pulleys of vine or rope around a wheel with pegs (envision the wheels from the breath of God in the Last Crusade).
The pulleys move the spikes along a friction track back and forth. The spikes only shoot out at intruders into the shaft of light in the chamber. During times such as cloudy days or nightfall the same amount of light falls on each bladder creating a homeostasis that balances the seesaw. The twin shafts of light actually have a single source but branch close to the chamber so that in the event of a bird flying over or dawn or dusk the same amount of light hits each bladder. The amount of light could also be modified or intensified by strategically placed gold artifacts that conduct heat and may reflect or refract the light. Dew and moisture from the rainforest and rock itself would also condense and evaporate causing cooling on the bladders preserving the homeostasis at a static rate.
The unusually cold temperatures inside the shafts because of the effect of the depth and darkness of the tunnel has on air temperature and also the radiant cooling effect of groundwater or rainwater entering the shaft preternaturally preserve the animal skins and vines. Remember Forrestal? He was still partially preserved because of the air temperature of the chamber whereas a corpse on the floor of the jungle outside the temple would become skeleton-ized very rapidly by the heat and humidity not to mention insect activity assisting the decomposition rate.
In the event that the spikes are activated they can be retracted the same way by temperature changes of the bladders reversing the pulley system. Think of it like an ancient version of the drinking bird. You can see a drinking bird used as a trigger device in the film Darkman.