Page 1 of 1
Help with a script
Posted: Fri Oct 05, 2012 4:55 am
by J. Trudel
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 :
-- opentheway script
function opentheway()
ogre_1:destroy()
dungeon_cave_in_1:destroy()
end
Re: Help with a script
Posted: Fri Oct 05, 2012 5:27 am
by HaunterV
move the plate further down the hall see if that works.
Re: Help with a script
Posted: Fri Oct 05, 2012 6:23 am
by J. Trudel
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 :
[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
Display device 2:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008
Display device 3:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008
Re: Help with a script
Posted: Fri Oct 05, 2012 10:27 am
by Crisim
could you try to connect the plate to a timer and wait .5 sec before destroying the ogre?
hope this help...
Re: Help with a script
Posted: Fri Oct 05, 2012 12:05 pm
by Komag
or even just 0.1sec, to make it simply not instantaneous.
Re: Help with a script
Posted: Fri Oct 05, 2012 2:12 pm
by J. Trudel
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.