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
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

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

Post 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?
Finished Dungeons - complete mods to play
dasarby
Posts: 28
Joined: Sun Dec 30, 2012 10:46 pm

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

Post 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?
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 »

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.
User avatar
Komag
Posts: 3654
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, thanks for the help! I'm testing now -- getting some very odd results so far, but looks promising :)
Finished Dungeons - complete mods to play
User avatar
Komag
Posts: 3654
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 »

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
Finished Dungeons - complete mods to play
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 »

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.
User avatar
Komag
Posts: 3654
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 »

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 :)
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

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

Post 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:
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Komag
Posts: 3654
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 »

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
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

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

Post 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..
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Post Reply