

prozails tool is not a Blender script , its a program that converts the animation files to version 2.Eleven Warrior wrote:EDIT: Ok skuggs I just realized it's a Blender add on and I have no idea what to do sorry. I am not sure now how to convert the 2 animation files
Ok guys I have done it. It's crude but it works nicely thxs from Skuggs and Prozil. If anyone wants this door just leave a post and ill put the model and scripts in my Drop BoxEleven Warrior wrote:Yesss dammmm it yesss I got it to work guys awesome. Errr so thxs to Prozils convertor and your script Skuggs. Sorry for being pain in the butt, but this door is so worth it![]()
![]()
Now I can continue on with the set. Thxs again guys wonderful - I have to say this - 10 Kudos to each of you
EDIT: The door can only be opened from one side though, but love it anyway. Now all I have to do is figure away to stop the party walking through the door lol.
Code: Select all
--- Swing Door ---
defineObject{
name = "sx_swingdoor",
baseObject = "lever",
components = {
{
class = "Model",
model = "mod_assets/models/swingdoor_ani.fbx",
offset = vec(0,1.375,0),
},
{
class = "Animation",
animations = {
activate = "mod_assets/animations/swingdoor_open.fbx",
deactivate = "mod_assets/animations/swingdoor_close.fbx",
}
},
},
}
Code: Select all
defineObject{
name = "blocker_1",
baseObject = "blocker",
components = {
{
class = "Obstacle",
blockParty = true,
blockItems = true,
},
{
class = "Controller",
onActivate = function(self)
self.go.obstacle:enable()
end,
onDeactivate = function(self)
self.go.obstacle:disable()
end,
onToggle = function(self)
if self.go.obstacle:isEnabled() then
self.go.obstacle:disable()
else
self.go.obstacle:enable()
end
end,
},
},
placement = "floor",
editorIcon = 96,
}
You can place an invisible lever on the other side that toggles the door so you can open it from both sides. (not tested but you can should be able to remove the model component of the dungeon lever)Eleven Warrior wrote:EDIT: The door can only be opened from one side though, but love it anyway. Now all I have to do is figure away to stop the party walking through the door lol.
Code: Select all
--- Levers fake ---
defineObject{
name = "fake_lever",
--baseObject = "lever",
components = {
--{
--class = "Model",
--model = "assets/models/env/wall_lever.fbx",
--offset = vec(0, 1.375, 0),
--},
{
class = "Animation",
animations = {
activate = "assets/animations/env/lever_down.fbx",
deactivate = "assets/animations/env/lever_up.fbx",
}
},
{
class = "Clickable",
offset = vec(0,1.375,0),
size = vec(0.4, 0.6, 0.4),
--debugDraw = true,
},
{
class = "Lever",
--sound = "lever",
},
},
placement = "wall",
editorIcon = 12,
}
Code: Select all
defineObject{
name = "sx_swingdoor_clickable",
baseObject = "lever",
components = {
{
class = "Model",
model = "mod_assets/sx_towntileset/models/swingdoor_ani.fbx",
offset = vec(0,1.375,0),
},
{
class = "Animation",
animations = {
activate = "mod_assets/animations/swingdoor_open.fbx",
deactivate = "mod_assets/animations/swingdoor_close.fbx",
},
},
{
class = "Door",
sparse = true,
killPillars = true,
openVelocity = 10.0,
closeVelocity = 0,
closeAcceleration = -10,
},
{
class = "Clickable",
maxDistance = 1,
-- offset vector is the point where begin the clickable box
offset = vec(0,1.3,0),
-- size is the size of our clickable box
size = vec(2.5,2.5,0.3),
onClick = function(self)
self.go.door:toggle()
end
},
{
class = "Controller",
onOpen = function(self, name)
self.go.door:open()
end,
onClose = function(self)
self.go.door:close()
end,
onToggle = function(self)
self.go.door:toggle()
end,
},
},
placement = "wall",
editorIcon = 124,
}