Pit immunity crashes the game
Posted: Fri Apr 26, 2013 1:52 pm
I'm using a pit immunity script and it crashes the (exported) game when I save it. I started out by using the pit immunity script from the useful scripts repository but it didn't work for me so I changed it a bit. The timer was the problem and I added a pressure plate to stop the script instead.
Top floor script:
The script that connects to the pressure plate the floor above the landing point:
The error message:
Top floor script:
SpoilerShow
Code: Select all
function tempImmunity()
for i = 1,4 do
pitImmunity = party:getChampion(i)
pitImmunity:setEnabled(false)
end
end
SpoilerShow
Code: Select all
function immunityRevoke()
for i = 1,4 do
pitImmunity = party:getChampion(i)
pitImmunity:setEnabled(true)
end
end
SpoilerShow
script_entity_2: cannot serialize table 'pitImmunity' with metatable
stack traceback:
[C]: in function 'error'
[string "ScriptEntity.lua"]: in function 'saveValue'
[string "ScriptEntity.lua"]: in function 'saveState'
[string "GameMode.lua"]: in function 'saveGame'
[string "SaveGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk
stack traceback:
[C]: in function 'error'
[string "ScriptEntity.lua"]: in function 'saveValue'
[string "ScriptEntity.lua"]: in function 'saveState'
[string "GameMode.lua"]: in function 'saveGame'
[string "SaveGameMenu.lua"]: in function 'update'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk