Beach Puzzle Statue revamp

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Beach Puzzle Statue revamp

Post by Emera Nova »

So I'm currently trying to make it so the beach puzzle statue can be used as a surface instead of something that accepts items as it currently does.

Code: Select all

defineObject{
	name = "final_puzzle_statue",
	baseObject = "base_wall_decoration",
	components = {
		{
			class = "Model",
			model = "assets/models/env/forest_statue_pillar_03.fbx",
			offset = vec(0, -1, 0),
			staticShadow = true,
		},
		{
			class = "Clickable",
			offset = vec(-0.02, 1.45, -0.4),
			size = vec(0.6, 0.2, 0.2),
			--debugDraw = true,
		},
		{
			class = "Surface",
			offset = vec(-0.1, 1.37, -0.37),
			rotation = vec(0, 0, -3),
			--debugDraw = true,
		},	
		{
			class = "ItemConstrainBox",
			offset = vec(0, 1.5, 0),
			size = vec(0.9, 3, 0.9),
			--debugDraw = true,
		},
		{
			class = "ProjectileCollider",
			size = vec(1.1, 3, 0.8),
			--debugDraw = true,
		},
	},
	placement = "wall",
}
I thought If I gave it the surface class here it would work but instead if like crashes hard.. Any particular reason why? Is it possible for this object to be turned into something like an alcove? I'm trying to make it so when you walk up you can collect weapons from it.
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Re: Beach Puzzle Statue revamp

Post by Emera Nova »

Code: Select all

defineObject{
	name = "final_puzzle_statue",
	baseObject = "base_alcove",
	components = {
		{
			class = "Model",
			model = "assets/models/env/forest_statue_pillar_03.fbx",
			offset = vec(0, -1, 0),
			staticShadow = true,
		},
		{
			class = "Clickable",
			offset = vec(-0.02, 1.45, -0.4),
			size = vec(0.6, 0.2, 0.2),
			--debugDraw = true,
		},
		{
			class = "Occluder",
			offset = vec(-0.1, 1.37, -0.37),
			rotation = vec(0, 0, -3),
		},	
		{
			class = "ItemConstrainBox",
			offset = vec(0, 1.5, 0),
			size = vec(0.9, 3, 0.9),
			--debugDraw = true,
		},
		{
			class = "ProjectileCollider",
			size = vec(1.1, 3, 0.8),
			--debugDraw = true,
		},
	},
	placement = "wall",
}
So I got it to accept me presetting items into it like an alcove.. Sadly it keeps it at the height of the alcove, so now I gotta figure out how to lift it so the items are where the hands are so it looks like its holding them.
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Beach Puzzle Statue revamp

Post by THOM »

If you erase the two "--" before debugDraw = true, a box will be drawn which represents the clickable/surface-area. If you cange the values of offset you can place them carefully...
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply