Page 1 of 2

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

Posted: Thu Jan 24, 2013 8:24 pm
by Komag
Is there an easy way to have a door change the direction it opens/moves? I want to make a secret door wall physically move back or else move sideways, not up.

I know the iron door is really two doors, each moves to the side, and I toyed with making one side invisible, but the other side doesn't move over a full square, only about 1/2 or so.

Ideas? Been done already and I missed it?

What about just making an object move a square (smoothly)? I know I can do it with a zillion alcoves, but that's sort of complex. I konw JKos has the telekinesis spell which uses offsets (how to avoid the slightly random rotation?), maybe that's a good way to go?

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

Posted: Thu Jan 24, 2013 8:35 pm
by dasarby
I might I remembering something that isn't real, but didn't
SpoilerShow
the ballista
at the climax of phitt's mine animate? Maybe you could have an invisible door in place and then something that looks-like-a-door-but-is-not-a-door on the same cell and animate that object?

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

Posted: Thu Jan 24, 2013 10:10 pm
by LordYig
Doors are not animated.
Rather than frame animation stored in a file, the engine seems to control it by using the orientation of the root node of the model.
The node orientation then dictates the direction in which the door will open.

Changing the direction requires rotating the root node and then rotating the model mesh node to obtain a properly positioned model.
It can all be done with the GMT.

Let take the "dungeon_secret_door" model as a reference.
We can find the following position matrix in the nodes tab for this model.

Code: Select all

1 0 0 0
0 1 0 0
0 0 1 0
This setting will make the door goes up.
Keep this in mind if you want to reset the model.

If you want to change this you can apply one of the following rotation to the root node :

Code: Select all

For the root node:
-- door up : default
-- door left : Y -90 then X -90
-- door right : Y -90 then X -270
-- door down : X -180

For the mesh node:
-- door up : default
-- door left : X 90 then Y 90
-- door right : X 270 then Y 90
-- door down : X 180
The mesh will rotate as well and the model will be messed up at this point.
To correct this and get a proper orientation for the model you will have to use and apply opposite values for rotating the mesh node.
For single doors it should be named gate.

Be aware that the values I propose are not 100% sure, I've only determined those by testing but I may be wrong.
Using this kind of transformation I was able to make single door models open down, left or right.

Edit : Added info for the mesh node rotation.

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

Posted: Thu Jan 24, 2013 10:37 pm
by Komag
Wow, thanks for the help! I'm testing now -- getting some very odd results so far, but looks promising :)

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

Posted: Thu Jan 24, 2013 10:57 pm
by Komag
hmm, so far I'm not having good luck

no matter what I do, the door moves upward. If I just change root node y-90 and x-90 then the mesh appears flat on the ground, so then if I actually save it that way then use it in-game, it appears completely normal and opens upward. If I also rotate the gate node y90 and x90 so the mesh appears back to normal, then in game it's sideways and halfway embedded in the floor, but still moves up when I open it! Not sure how to ever see a door move sideways

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

Posted: Fri Jan 25, 2013 2:30 am
by LordYig
Komag wrote:hmm, so far I'm not having good luck

no matter what I do, the door moves upward. If I just change root node y-90 and x-90 then the mesh appears flat on the ground, so then if I actually save it that way then use it in-game, it appears completely normal and opens upward. If I also rotate the gate node y90 and x90 so the mesh appears back to normal, then in game it's sideways and halfway embedded in the floor, but still moves up when I open it! Not sure how to ever see a door move sideways
Hum. That's strange...

I have tried again with some of the models from the asset pack and you are right I cannot get any door to behave like my custom doors...
It's definitely working with custom models, but I don't get what is going wrong with the asset pack model... :cry:

If you can wait until I release my pack you can get this kind of door.
I'll do my best to release at least a partial pack as soon as possible.

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

Posted: Fri Jan 25, 2013 2:40 am
by Komag
Okay, great, thanks! I'll put a placeholder for now then, and come back to it. I'm hoping to wrap up over the next week or so, then start testing :)

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

Posted: Fri Jan 25, 2013 2:46 am
by Neikun
Sounds like a challenge more fun than my contorted gladiator statue crystal.

You want a sideways opening door, or preferably a door that slides backwards one whole space?

Edit:
Gate nodes are finicky things. Made a neat puzzle door that is partially open, but the player can't get through though.. It lets fireballs pass through it.. :twisted:

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

Posted: Fri Jan 25, 2013 3:18 am
by Komag
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

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

Posted: Fri Jan 25, 2013 3:18 am
by Neikun
Hmmm..
*digs into monster animations*

EDIT:
OOOH Using the Cube, I could get it to "fall" backwards!

Or at least it works in the GMT..