
I will start with a simple question.
Why doesn't this work? is it a bug or just me?
damageTile(1, dungeon_door_iron_1.x, dungeon_door_iron_1.y, 1, 1, "physical", 2)
it gives following error: attempt to index a nil value. But only if there is a monster on that tile.
full script:
function crushEast()
if (dungeon_door_iron_1:isOpen()) then
dungeon_door_iron_1:close()
damageTile(1, dungeon_door_iron_1.x, dungeon_door_iron_1.y, 1, 1, "physical", 2)
else
dungeon_door_iron_1:open()
end
end
Suggestion for scripting reference: Add simple example for every method/function, or at least to more complex ones like this, everyone loves examples

Thanks.