Page 1 of 1

object definition

Posted: Thu Dec 04, 2014 7:38 pm
by bongobeat
Hello all,
I'm trying to redefine the carpet and bed objects from log1:

can someone tell me how to set the carpet as a normal decoration, actually it's defined as an obstacle, I don't know what to put instead "base_obstacle"?

How to set the correct altar height for the bed? I ve tried the

Code: Select all

	anchorPos = vec(-0, 0.46, 0),
	anchorRotation = vec(0, 15, 0),
	targetPos = vec(-0, 0.46, 0),
	targetSize = vec(0.4, 0.5, 0.4),
but it crashes the editor after I put the bed on the map.

Code: Select all

-- Carpet for Legend of Grimrock
-- by Germanny 01/2013
defineObject{
	name = "log_carpet_a",
	baseObject = "base_obstacle",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/log_carpet_a.fbx",
			staticShadow = true,
		},
	},
	automapIcon = 152,
}

Code: Select all

defineObject{
	name = "grim_bed",
	baseObject = "base_altar",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/grim_bed.fbx",
			staticShadow = true,
		},
	},
	automapIcon = 152,
}

Re: object definition

Posted: Thu Dec 04, 2014 7:57 pm
by Batty
Decoration:

Code: Select all

defineObject{
	name = "log_carpet_a",
	baseObject = "base_floor_decoration",
   components = {
		{
			class = "Model",
			model = "mod_assets/models/log_carpet_a.fbx",
			staticShadow = true
		}
   },
	minimalSaveState = true
}
All the base object defintions are in base.lua in the newly released asset scripts.

Re: object definition

Posted: Sat Dec 06, 2014 12:05 am
by bongobeat
thank you :D

finally got the bed definition!

Code: Select all

-- Grimrock bed by germanny
defineObject{
	name = "grim_bed",
	baseObject = "base_altar",
	components = {
		{
			class = "Model",
			model = "mod_assets/models/grim_bed.fbx",
			staticShadow = true,
		},
		{
			class = "Surface",
			offset = vec(0.08, 0.44, 0),
			size = vec(0.7, 1),
			--debugDraw = true,
		},
	},
	automapIcon = 152,
}