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!
Aisuu
Posts: 61 Joined: Fri Oct 31, 2014 2:07 pm
Post
by Aisuu » Sat Nov 08, 2014 12:54 pm
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..
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..
Aisuu
Posts: 61 Joined: Fri Oct 31, 2014 2:07 pm
Post
by Aisuu » Sun Nov 09, 2014 1:27 pm
Well, only thing I figure out is that wall and gobelin have to by one model. And that is pretty annoying
If there is lua guru around, any help would be appreciate.
In LOG1 it was easy with class = "WallTapestry",
Isaac
Posts: 3189 Joined: Fri Mar 02, 2012 10:02 pm
Post
by Isaac » Mon Dec 15, 2014 9:39 pm
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",
},
}
}
Drakkan
Posts: 1318 Joined: Mon Dec 31, 2012 12:25 am
Post
by Drakkan » Mon Dec 15, 2014 9:48 pm
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