How might I make a secret door move horizontally? back/side

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: How might I make a secret door move horizontally? back/s

Post by Skuggasveinn »

Just going to put this out there, I know its a bit more complicated then simply rotating the nodes, but you have far greater freedom with your creations using this method, but a custom animation needs to be created on order for this to work.
(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,
}
Since levers do not "block" the party you can walk rigth through this, in order to fix that we create an empty door (just an empty model with a node called gate)
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,
}
Here you can even add your own sounds to the door, then its a simple matter of having something toggle the lever (that looks like a door), and in turn that lever toggles the invisible door unblocking or blocking the party as the fake lever door opens and closes.

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.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: How might I make a secret door move horizontally? back/s

Post by Phitt »

Komag wrote:What I REALLY want is a sideways or backward sliding statue that sounds just like a secret door, so if I could make doors slide sideways I could manage to take it from there I think
Did that a rather long time ago as a proof of concept after playing the big friendly Warden (where the statue was moved by script). I didn't delete it yet, so here is the download:

http://www.filedropper.com/dragonstatuemoving

The definition:

Code: Select all

defineObject{
	name = "dragon_gate",
	class = "Door",
	model = "mod_assets/models/DragonStatueMoving.fbx",
	openSound = "mine_empty",
	closeSound = "wall_sliding",
	lockSound = "wall_sliding_lock",
	openVelocity = 0.5,
	closeVelocity = -0.5,
	secretDoor = true,
	placement = "wall",
	editorIcon = 120,
}
and a video:

http://www.youtube.com/watch?v=Lo8W6CzpQDg
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How might I make a secret door move horizontally? back/s

Post by Komag »

Wow, that's perfect Phitt, exactly what I want, awesome! (minor issue - any reason the base seems more "rounded" than the normal statue?)

Skuggasveinn, do you have that documented somewhere else? That's valuable info, I'd like to get it into the superthread (if I don't already!) either by linking this thread or maybe a new one
Finished Dungeons - complete mods to play
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: How might I make a secret door move horizontally? back/s

Post by Skuggasveinn »

Komag wrote:Skuggasveinn, do you have that documented somewhere else? That's valuable info, I'd like to get it into the superthread (if I don't already!) either by linking this thread or maybe a new one
I will make two or three custom animated doors over the weekend and release the source

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
hyteria
Posts: 266
Joined: Sat Dec 29, 2012 8:22 pm

Re: How might I make a secret door move horizontally? back/s

Post by hyteria »

great job phitt , maybee you can do same technique to made the spike trap on model request tread ! :p

ps : btw i noticed that statue had no blocking effect :( is there a way to make it solid?
User avatar
LordYig
Posts: 175
Joined: Wed Jul 04, 2012 5:45 pm

Re: How might I make a secret door move horizontally? back/s

Post by LordYig »

I made a quick test with the dragon statue, and then I was able quickly reproduce it with the goromorg four way statue

Adding a new intermediate node between the RootNode and Gate node (mesh) did the trick.
You can make the new node the parent of the gate node and link it back as a child of the root node.
Applying the combined transformation matrix from Phitt's model to the newly created node made the original model usable as a door.
The matrix is :

Code: Select all

1 0 0 0
0 0 -1 0
0 1 0 1,5
After this you have to play with rotation values on the mesh (gate) node to get the correct mesh placement above the floor and properly aligned 1,5 unit on the left of the origin gizmo (blue axis).

This is more complicated than only playing with rotation values, but for some simple manipulation and sliding models it can be done this way too.

You can grab example files here :Statues as gates
Use the object definition provided by Phitt and only update/change the object name and the model name.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How might I make a secret door move horizontally? back/s

Post by Komag »

Thanks for digging into this, that's good stuff - I've linked this thread in the Superthread so it doesn't get lost :)
Finished Dungeons - complete mods to play
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: How might I make a secret door move horizontally? back/s

Post by bongobeat »

nice things!

going to test some, thanks! ;)
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply