I am trying to make a script that destroy a cave_in when an ogre charge on it, in a corridor I have a hidden pressure plate that is triggered only by monsters just next to a cave_in. The plate trigger a LUA script that destroy both the ogre and the cave in. The problem I have is if I set the plate to be triggered by the party, it works very well. But when switching the plate to be triggered by monster, the script fail for unknown reasons. Below is my script :
SpoilerShow
-- opentheway script
function opentheway()
ogre_1:destroy()
dungeon_cave_in_1:destroy()
end
Last edited by J. Trudel on Fri Oct 05, 2012 6:37 am, edited 1 time in total.
HaunterV wrote:move the plate further down the hall see if that works.
Same thing, this time the editor crashed.. maybe a bug triggered by a running ogre?
Edit : I tried with a snail and the script works fine, I get this error log :
SpoilerShow
[string "Monster.lua"]:0: attempt to index field 'animController' (a nil value)
stack traceback:
[string "Monster.lua"]: in function 'update'
[string "Monster.lua"]: in function 'update'
[string "Map.lua"]: in function 'updateEntities'
[string "Dungeon.lua"]: in function 'updateLevels'
[string "GameMode.lua"]: in function 'update'
[string "DungeonEditor.lua"]: in main chunk
[C]: in function 'xpcall'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
stack traceback:
[C]: in function 'error'
[string "DungeonEditor.lua"]: in function 'handleError'
[string "DungeonEditor.lua"]: in function 'preview'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk
OS Version 6.0
OEM ID: 0
Number of processors: 2
Page size: 4096
Processor type: 586
Total memory: 1789 MB
Free memory: 634 MB
Display device 0:
Device name: \\.\DISPLAY1
Device string: NVIDIA GeForce 8200M G
State flags: 00000005
Display device 1:
Device name: \\.\DISPLAY2
Device string: NVIDIA GeForce 8200M G
State flags: 00000000
I'll try tonight with a timer and let you know, I suspect that when the ogre charge, the script fail to detect it. The script worked out when the ogre walked on it so it.