Page 1 of 1
Question about eye sockets
Posted: Tue Mar 31, 2015 1:24 pm
by trancelistic
Hey all. I'm still trying to finish my LoG1 dungeon but I've stumbeld on something silly.
I can use the basic blue_gem(s) on the eye sockets but not the basic red and green gems.
So I thought, what if I clone the blue_gem and make it look like a green or red gem?. However that doesn't seem to work.
Could any 1 help me out here so that the daemonhead eye sockets also accepts an input of a green or red gem?
Thanks in advanced<3
Re: Question about eye sockets
Posted: Tue Mar 31, 2015 3:09 pm
by THOM
The sockets are only defined for blue gems.
In my dungeon I defined sockets for the other gems, too:
Code: Select all
defineObject{
name = "eye_socket_left_green",
class = "Alcove",
anchorPos = vec(0.21, 1.58, -0.45),
targetPos = vec(0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
return item.name == "green_gem" and
self:getItemCount() == 0
end,
editorIcon = 92,
}
defineObject{
name = "eye_socket_right_green",
class = "Alcove",
anchorPos = vec(-0.21, 1.58, -0.45),
targetPos = vec(-0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
return item.name == "green_gem" and
self:getItemCount() == 0
end,
editorIcon = 92,
}
defineObject{
name = "eye_socket_left_red",
class = "Alcove",
anchorPos = vec(0.21, 1.58, -0.45),
targetPos = vec(0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
return item.name == "red_gem" and
self:getItemCount() == 0
end,
editorIcon = 92,
}
defineObject{
name = "eye_socket_right_red",
class = "Alcove",
anchorPos = vec(-0.21, 1.58, -0.45),
targetPos = vec(-0.2, 1.65, -0.45),
targetSize = vec(0.1, 0.1, 0.1),
placement = "wall",
onInsertItem = function(self, item)
return item.name == "red_gem" and
self:getItemCount() == 0
end,
editorIcon = 92,
}
Or you do a multigem-socket. I did it this way for the mouth socket - maybe you can script something similar for the eye-sockets:
Code: Select all
cloneObject{
name = "mouth_socket_multigem",
baseObject = "mouth_socket",
onInsertItem = function (self, item)
local a, b = string.find (item.name, "_gem")
return a ~= nil and b == string.len(item.name) and self:getItemCount() == 0
end,
}
Re: Question about eye sockets
Posted: Tue Mar 31, 2015 3:28 pm
by trancelistic
Wow very nice and thanks for the fast feedback. I haven't tried the code yet but isn't this missing a model for this?. ( or am i now completly noob for asking this?)
Or.. do I need to place this "inside" the same location with a normal daemonhead model?.
luv ya <3 and greetz.
Ps If I wanted to change A model. Like for exsample, make a true basic "blue_gem" as it supose to work like in the orginal release of grimrock but for says I wanted it to look like a knife, but works as the normal "blue_gem"
How would I define such a thing? ( not that I need it, but then I coudl understand the code(s) beter or location where all models are. I do know the stuff like "model = "assets/models/env/dungeon_pillar.fbx"," but thats a dungeon_pillar but where are the items/models located? That I never knew:(
For an exsmaple: I could define a knife looking like a pillar.. then it would be: (model = "assets/models/env/dungeon_pillar.fbx",) ( i guess) But that is a model for the dungeon itself. Where is the items directory? Like food, armor, etc.
Re: Question about eye sockets
Posted: Tue Mar 31, 2015 4:25 pm
by THOM
You don't need a model beciase this is just a pure socket object. Just mechanic - nothing to see...
Item models are at - well... assets\models\items
Re: Question about eye sockets
Posted: Tue Mar 31, 2015 7:19 pm
by trancelistic
Meh. im such a fool.
I blame myself being months on a break, so Ive forgot most.
I still love this game and older rpgs. Specialy people who has the same intrest as me.
I just hope people will try out me dungeon when its finished.... I know log2 is out haha. Its a great game as well. But i'd thought the real dungeon crawler like dm1 is in a way better.. I so want to share my dungeon once its finished.
I hope people will play it<3
I know nexus(site) is online but I never managed to register to it...
I know my heart I should upload my .. soon. finished dungeon there.. but how.. I don't understand the nexus site at all:S
Re: Question about eye sockets
Posted: Sun Apr 12, 2015 1:43 pm
by trancelistic
Thom Thanks for the code. It works perfect<3