![Sad :(](./images/smilies/icon_e_sad.gif)
thanks again
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Code: Select all
time = 0
function openAllPits()
for i in allEntities(party.level) do
if i.id:sub(1,13) == "sequence_pit_" then
i:open()
end
end
end
function startSequence()
openAllPits()
pit_sequence_timer:deactivate()
time = 0
pit_sequence_timer:activate()
end
function tick()
if
time == 1
then
sequence_pit_01:close()
elseif
time == 2
then
sequence_pit_02:close()
elseif
time == 3 then
sequence_pit_01:open()
sequence_pit_03:close()
elseif
time == 4 then
sequence_pit_02:open()
sequence_pit_04:close()
elseif
time == 5 then
sequence_pit_03:open()
sequence_pit_05:close()
elseif
time == 6 then
sequence_pit_04:open()
elseif
time == 7 then
sequence_pit_05:open()
pit_sequence_timer:deactivate()
end
time = time + 1
end
Code: Select all
elseif
time == 6 then
sequence_pit_04:open()
sequence_pit_06:close()
Just thinking, It may be possible to adjust the timer based on the number of attempts the player has... so each time he falls down a pit, a pad triggers that increases the interval slightly... making the puzzle easier with each failure.Grimwold wrote: * The initial deactivate of the timer in the start function may not be necessary, but does allow scope for adjusting the interval in the script by first stopping the timer and restarting it. just add a setTimerInterval() command in between.