Page 1 of 1
Gobelins
Posted: Sat Nov 08, 2014 12:54 pm
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..
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..
Re: Gobelins
Posted: Sun Nov 09, 2014 1:27 pm
by Aisuu
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",
Re: Gobelins
Posted: Mon Dec 15, 2014 9:39 pm
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",
},
}
}
Re: Gobelins
Posted: Mon Dec 15, 2014 9:48 pm
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
