Gobelins

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
User avatar
Aisuu
Posts: 61
Joined: Fri Oct 31, 2014 2:07 pm

Gobelins

Post by Aisuu »

Anyone redo gobelins from LOG1? I folowed Skuggasveinn tutorial Breakable Walls and I cant get it work. Iam testing it with wall_ivy.
My code so far..
SpoilerShow

Code: Select all

defineObject{
	name = "gobelin",
	baseObject = "dungeon_wall_ivy_01",
	components = {
		{
			class = "Obstacle",
			hitSound = "barrel_hit",
			hitEffect = "hit_wood",
		},
		{
			class = "Health",
			health = 0,
			spawnOnDeath = "dungeon_wall_ivy_02",
		},
		{
			class = "Controller",
		},
	},
	placement = "wall",
	editorIcon = 92,
}
It work okey, but with one glich. You have to by one tile away from it. What am I doing wrong?
I tryed offset it somehow, but Iam lost..
User avatar
Aisuu
Posts: 61
Joined: Fri Oct 31, 2014 2:07 pm

Re: Gobelins

Post by Aisuu »

Well, only thing I figure out is that wall and gobelin have to by one model. And that is pretty annoying :cry:
If there is lua guru around, any help would be appreciate.

In LOG1 it was easy with class = "WallTapestry",
User avatar
Isaac
Posts: 3189
Joined: Fri Mar 02, 2012 10:02 pm

Re: Gobelins

Post by Isaac »

Gobelin as per LoG1, but using the LoG2 wall cloth.

Code: Select all

defineObject{

	name = "gobelin",
	baseObject = "base_wall_decoration",
	components = {
					{
					   class = "Clickable",
					   onClick = function (self)
									playSound("wall_tapestry_tear")
									self.go:spawn("castle_wall_cloth_torn")
									self.go:destroy()
								end,
						offset = vec(0,1.5,0),
						size = vec(3, 3, .1),
					},

					 {
					   class = "Model",
					   model = "assets/models/env/castle_wall_cloth.fbx",
					},

					{
					 	class = "Obstacle",
						blockParty = false,
						blockMonsters = false,
						blockItems = false,
						repelProjectiles = false,

					},
					{
						class = "Health",
						health = 1,
						immunities = { "poison", "physical"},
						spawnOnDeath = "castle_wall_cloth_torn",
					},

	}
}
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Gobelins

Post by Drakkan »

Isaac wrote:Gobelin as per LoG1, but using the LoG2 wall cloth.

Code: Select all

defineObject{

	name = "gobelin",
	baseObject = "base_wall_decoration",
	components = {
					{
					   class = "Clickable",
					   onClick = function (self)
									playSound("wall_tapestry_tear")
									self.go:spawn("castle_wall_cloth_torn")
									self.go:destroy()
								end,
						offset = vec(0,1.5,0),
						size = vec(3, 3, .1),
					},

					 {
					   class = "Model",
					   model = "assets/models/env/castle_wall_cloth.fbx",
					},

					{
					 	class = "Obstacle",
						blockParty = false,
						blockMonsters = false,
						blockItems = false,
						repelProjectiles = false,

					},
					{
						class = "Health",
						health = 1,
						immunities = { "poison", "physical"},
						spawnOnDeath = "castle_wall_cloth_torn",
					},

	}
}
thanks ;)
Breath from the unpromising waters.
Eye of the Atlantis
Post Reply