(this is the swinging door from the upcoming town tileset btw)
Doors have hardcode animations yes, but levers do not.
So what you can do is to create a lever model that is the door and create custom animation for active / deactive ( or open or close)
since you are creating a custom animation the sky is the limit here, you can make it swing, break apart, open in any direction you want etc etc.
Code: Select all
defineObject{
name = "sx_swingdoor",
class = "Lever",
model = "mod_assets/sx_towntileset/models/swingdoor_ani.fbx",
activateAnim = "mod_assets/sx_towntileset/animations/swingdoor_open.fbx",
deactivateAnim = "mod_assets/sx_towntileset/animations/swingdoor_close.fbx",
placement = "wall",
editorIcon = 12,
}
this will act as blocker
Code: Select all
defineObject{
name = "sx_invisible_door",
class = "Door",
model = "mod_assets/sx_towntileset/models/sx_blocker.fbx",
openSound = "wall_sliding",
closeSound = "wall_sliding",
lockSound = "wall_sliding_lock",
openVelocity = 10,
closeVelocity = -10,
secretDoor = true,
placement = "wall",
editorIcon = 120,
}
The drawback is that the "click" sound of the lever gets heard when it toogles (but thats minor), but on return this opens up the possibility to create doors that have not been seen before like drawbridges, rotating doors etc etc.
Skuggasveinn.