Page 1 of 1

New lock object crashing editor.

Posted: Sun Oct 21, 2012 5:29 am
by Wolfen
I have created a new lock object. I created a model, centered the pivot on the object, the object is at 0 0 0, assigned a known used material. Created an object in the objects lua

Code: Select all

defineObject{
	name = "lock_sewer_dagger",
	class = "Lock",
	model = "assets/models/env/sewers_dag_wall01.fbx",
	height = 1.375,
	placement = "wall",
	editorIcon = 20,
}
When I go to add the object I get a crash from the editor. It lets me select the object, and move it around, but the moment I click to actually add it to the dungeon is when it crashes. The following is from the error.log

[string "Lock.lua"]:0: File not found: assets/models/env/sewers_dag_wall01.model
stack traceback:
[C]: in function 'load'
[string "Lock.lua"]: in function 'entityAddedToMap'
[string "Map.lua"]: in function 'addEntity'
[string "BaseEntity.lua"]: in function 'spawn'
[string "Arch.lua"]: in function 'spawn'
[string "DungeonEditor.lua"]: in function 'addObjectTool'
[string "DungeonEditor.lua"]: in function 'mapView'
[string "DungeonEditor.lua"]: in function 'update'
[string "Grimrock.lua"]: in main chunk

Any ideas what could be causing this?

Re: New lock object crashing editor.

Posted: Sun Oct 21, 2012 5:42 am
by Neikun
It's because your file is not where your script says it is.
model = "assets/models/env/sewers_dag_wall01.fbx",
should perhaps be
model = "mod_assets/models/env/sewers_dag_wall01.fbx",

Re: New lock object crashing editor.

Posted: Sun Oct 21, 2012 5:44 am
by Wolfen
Neikun wrote:It's because your file is not where your script says it is.
model = "assets/models/env/sewers_dag_wall01.fbx",
should perhaps be
model = "mod_assets/models/env/sewers_dag_wall01.fbx",
Oh f'n duh. I forgot to add mod.... errrrrrrrrrrrrrrrrrrp. Thanks for the stupid check

Re: New lock object crashing editor.

Posted: Sun Oct 21, 2012 5:51 am
by Neikun
Not a problem, we all make these kinds of mistakes. -that's how I found it so fast, I've done it myself haha