Page 1 of 1
can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 2:25 am
by Skuggasveinn
I'm trying to create a weapon rack (see url)
http://cloud.steampowered.com/ugc/54181 ... 42D05D27A/
But all the weapons end up in a pile since there is only one anchorPos, I have been trying to define multible anchorPos (funny enough that does not throw an error) but that seems to scramble the object placed in the rack.
Does the engine support multible anchorPos in the same object ? and if so what is the correct syntax of doing this ?
Another idea I had of getting this to work would be to break the model into 3 parts, make 3 objects with offset from one another so when the are placed on the same tile they would create the illusion of a coherent object. You could then define anchorPos and targetsize for each and it would look and feel like the weapon rack was holding 3 weapons !
Skuggasveinn.
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 2:31 am
by Neikun
So far what we've been doing with custom alcoves is cloning what alcoves we've made, then remove the model and change the anchor position.
How'd you get the spear to stand up, like that?

Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 2:35 am
by Skuggasveinn
This is the object, I saw that the torch_holder had anchorRotation that was not present on the alcove or the altar class, tried to add it and just like magic it worked
[
Code: Select all
defineObject{
name = "cl_temple_rack",
class = "Alcove",
model = "mod_assets/models/env/cl_temple_rack.fbx",
replacesWall = false,
anchorPos = vec(0.38, 1.1, -1.2),
anchorRotation = vec(0, 0, -90),
targetPos = vec(0,0.95,0),
targetSize = vec(0.6, 0.5, 0.6),
placement = "wall",
editorIcon = 8,
}
Skuggasveinn.
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 2:41 am
by Neikun
Skuggasveinn wrote:This is the object, I saw that the torch_holder had anchorRotation that was not present on the alcove or the altar class, tried to add it and just like magic it worked
[
Code: Select all
defineObject{
name = "cl_temple_rack",
class = "Alcove",
model = "mod_assets/models/env/cl_temple_rack.fbx",
replacesWall = false,
anchorPos = vec(0.38, 1.1, -1.2),
anchorRotation = vec(0, 0, -90),
targetPos = vec(0,0.95,0),
targetSize = vec(0.6, 0.5, 0.6),
placement = "wall",
editorIcon = 8,
}
Skuggasveinn.
And my eyes suddenly went so wide my head exploded.
I gotta try making alcoves out of singular hooks for shields now!
EDIT: One problem with the singular hooks: They're designed to be on pillars, so there's a huge gap from the wall. D:
Code:
Code: Select all
defineObject{
name = "wall_hook_alcove_singular",
class = "Alcove",
anchorPos = vec(0, 1.40, -0.34),
anchorRotation = vec(90, 0, -90),
targetPos = vec(0, 1.40, -0.34),
targetSize = vec(0.6, 0.5, 0.6),
model = "assets/models/env/metal_hook_pillar.fbx",
onInsertItem = function(self, item)
return item.name == "heavy_shield" and self:getItemCount() == 0
end,
placement = "wall",
replacesWall = false,
editorIcon = 92,
}
I have no idea how I'm going to get rid of the space between the wall and the hook.
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 3:33 am
by Skuggasveinn
Thanks alot for the input, creating objects without models is alot easier then stitching together models like I was planing, you just saved me hours of work
I thing this will work out like a charm, take a look.
http://cloud.steampowered.com/ugc/54181 ... 621BFE404/
Regarding the hooks, what about the decorative chain thing on the walls.
Code: Select all
wallDecorations = {
"assets/models/env/metal_hooks_wall.fbx", 1,
"assets/models/env/metal_hooks_chain_wall.fbx", 1,
},
Using them as a template for shield alcove, that way the shield will be on the wall, between the pillars like the chains.
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 3:55 am
by Neikun
I already have a version of the metal hooks as an alcove. *vertically down. But you have a point. There's no reason why I couldn't hang a shield on it's side.
But with a singular hook, I could use it to hang shields.
Nice looking stuff you got there.
Are you planning on releasing the models and custom assets to the modding community?
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 4:17 am
by Skuggasveinn
This dungeon will (hopefully) get released within the next 2 or 3 weeks.
I made it a goal to not go overboard, and only have it 5 levels down.
And Yes, soon after the release the mod_assets folder will be available for everyone.
Re: can you define multible anchorPos on a object ?
Posted: Tue Oct 02, 2012 12:01 pm
by Neikun
Yay!