Page 2 of 2

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

Posted: Fri Jan 25, 2013 5:39 am
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.

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

Posted: Fri Jan 25, 2013 8:40 am
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

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

Posted: Fri Jan 25, 2013 11:23 am
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

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

Posted: Fri Jan 25, 2013 1:06 pm
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.

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

Posted: Fri Jan 25, 2013 9:20 pm
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?

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

Posted: Fri Jan 25, 2013 10:35 pm
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.

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

Posted: Fri Jan 25, 2013 11:05 pm
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 :)

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

Posted: Sun Jun 23, 2013 2:52 pm
by bongobeat
nice things!

going to test some, thanks! ;)