local BEGIN_END_CUTSCENE = 144
system.registerActionPartHook(BEGIN_END_CUTSCENE, "checkCutscene")
function checkCutscene(actionPart)
if actionPart.Int == 0 then -- cutscene active
Conditions["cutscene_active"].Value = true
elseif actionPart.Int == 1 then -- cutscene inactive
Conditions["cutscene_active"].Value = false
end
return false
end
-- * key event handler * --
function keyboardHandler(eventType, character, keycode, modifiers)
if Conditions["cutscene_active"].Value then
return true -- key events disabled
else
return false -- key events active
end
end
registerEventHandler("keyEvent", "keyboardHandler")